|From:||Peter Eisentraut <peter_e(at)gmx(dot)net>|
|Subject:||[PATCH] better systemd integration|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
I have written a couple of patches to improve the integration of the
postgres daemon with systemd.
The setup that is shipped with Red Hat- and Debian-family packages at
the moment is just an imitation of the old shell scripts, relying on
polling by pg_ctl for readiness, with various custom pieces of
complexity for handling custom port numbers and such.
In the first patch, my proposal is to use sd_notify() calls from
libsystemd to notify the systemd daemon directly when startup is
completed. This is the recommended low-overhead solution that is now
being adopted by many other server packages. It allows us to cut out
pg_ctl completely from the startup configuration and makes the startup
configuration manageable by non-wizards. An example is included in the
The second patch improves integration with the system journal managed by
systemd. This is a facility that captures a daemon's standard output
and error and records it in configurable places, including syslog. The
patch adds a new log_destination that is like stderr but marks up the
output so that systemd knows the severity. With that in place, users
can choose to do away with the postgres log file management and let
systemd do it.
The third patch is technically unrelated but arose while I was working
on this. It improves error reporting when the data directory is missing.
|Next Message||Tom Lane||2015-11-17 14:43:03||Re: Bug in numeric multiplication|
|Previous Message||Amit Kapila||2015-11-17 13:41:28||Re: Speed up Clog Access by increasing CLOG buffers|