Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] systemd + postgresql is non-obvious to me
Date: Fri, 22 Aug 2014 18:08:06
Message-Id: CAGfcS_nD+mVnYO290LJrPwFMiMjM_pK1teZKd8YNdd6SPDO7bA@mail.gmail.com
In Reply to: Re: [gentoo-dev] systemd + postgresql is non-obvious to me by "Aaron W. Swenson"
1 On Fri, Aug 22, 2014 at 1:23 PM, Aaron W. Swenson <titanofold@g.o> wrote:
2 > On the whole, I'm displeased with the systemd alternative for
3 > controlling PostgreSQL. It's significantly hampered and doesn't allow
4 > as much flexibility as the initscript. The major issue being trying to
5 > nicely shut down the server instead of jumping straight to murder.
6 >
7
8 It looks like the package installs a service file provided by
9 upstream, so you might want to direct your complaint there unless it
10 really is a systemd limitation.
11
12 Checking the latest version in portage it calls:
13 ExecStop=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl stop -D
14 ${DATA_DIR} -s -m fast
15
16 I'm no postresql expert, but according to the manpage that should
17 bring the server to a screeching, but still controlled, halt. Perhaps
18 you would prefer setting it to -m smart instead of -m fast.
19
20 If so override it in /etc/systemd/system. I generally recommend using
21 drop-ins for this, but I'm not sure if doing a drop-in for ExecStop
22 will override the existing value, or simply cause systemd to run both
23 commands (which means that whichever runs first will control how it
24 stops).
25
26 Systemd shouldn't begin killing processes without mercy until the
27 process invoked in ExecStop terminates, so it should not terminate
28 until the process has finished graceful shutdown.
29
30 Rich

Replies

Subject Author
Re: [gentoo-dev] systemd + postgresql is non-obvious to me "Canek Peláez Valdés" <caneko@×××××.com>
Re: [gentoo-dev] systemd + postgresql is non-obvious to me Mike Gilbert <floppym@g.o>
Re: [gentoo-dev] systemd + postgresql is non-obvious to me "Aaron W. Swenson" <titanofold@g.o>