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 |