Re: [HACKERS] [PATCH] better systemd integration

2016-02-02 Thread Peter Eisentraut
I've committed this. Thanks for checking. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [PATCH] better systemd integration

2016-02-01 Thread Pavel Stehule
Hi > index 2e7f1d7..d983a50 100644 > --- a/src/backend/postmaster/postmaster.c > +++ b/src/backend/postmaster/postmaster.c > @@ -4933,6 +4933,11 @@ sigusr1_handler(SIGNAL_ARGS) > if (XLogArchivingAlways()) > PgArchPID = pgarch_start(); > > +#ifdef USE_SYSTEMD > + if

Re: [HACKERS] [PATCH] better systemd integration

2016-01-30 Thread Peter Eisentraut
On 1/29/16 4:15 PM, Pavel Stehule wrote: > Hi > > > > > > > You sent only rebased code of previous version. I didn't find additional > > checks. > > Oops. Here is the actual new code. > > > New test is working as expected > > I did lot of tests - and this code works

Re: [HACKERS] [PATCH] better systemd integration

2016-01-30 Thread Peter Eisentraut
On 1/28/16 9:46 AM, Christoph Berg wrote: > If a cluster is configured for non-hot-standby replication, the > READY=1 seems to never happen. Did you check if that doesn't trigger > any timeouts with would make the unit "fail" or the like? As Pavel showed, it doesn't work for that. I'll look into

Re: [HACKERS] [PATCH] better systemd integration

2016-01-30 Thread Pavel Stehule
2016-01-30 22:38 GMT+01:00 Peter Eisentraut : > On 1/29/16 4:15 PM, Pavel Stehule wrote: > > Hi > > > > > > > > > > > You sent only rebased code of previous version. I didn't find > additional > > > checks. > > > > Oops. Here is the actual new code. > > > > >

Re: [HACKERS] [PATCH] better systemd integration

2016-01-30 Thread Peter Eisentraut
On 1/28/16 10:08 AM, Alvaro Herrera wrote: > I wonder if instead of HAVE_SYSTEMD at each callsite we shouldn't > instead have a pg_sd_notify() call that's a no-op when not systemd. We do this for other optional features as well, and I think it keeps the code clearest, especially if the ifdef'ed

Re: [HACKERS] [PATCH] better systemd integration

2016-01-29 Thread Pavel Stehule
Hi > > > > > You sent only rebased code of previous version. I didn't find additional > > checks. > > Oops. Here is the actual new code. > > New test is working as expected I did lot of tests - and this code works perfect in single server mode, and with slave hot-standby mode. It doesn't work

Re: [HACKERS] [PATCH] better systemd integration

2016-01-28 Thread Pavel Stehule
> > > Second issue: > > > > Mapping of levels between pg and journal levels is moved by1 > > This is the same as how the "syslog" destination works. > > I understand to this logic, but I miss any documentation. Regards Pavel

Re: [HACKERS] [PATCH] better systemd integration

2016-01-28 Thread Pavel Stehule
Hi 2016-01-28 3:50 GMT+01:00 Peter Eisentraut : > On 1/27/16 7:02 AM, Pavel Stehule wrote: > > The issues: > > > > 1. configure missing systemd integration test, compilation fails: > > > > postmaster.o postmaster.c > > postmaster.c:91:31: fatal error: systemd/sd-daemon.h: No

Re: [HACKERS] [PATCH] better systemd integration

2016-01-28 Thread Christoph Berg
Hi Peter, thanks for working on this, I'm looking forward to make Debian's pg_*cluster tools work with that (and hopefully be able to remove tons of legacy code). If a cluster is configured for non-hot-standby replication, the READY=1 seems to never happen. Did you check if that doesn't trigger

Re: [HACKERS] [PATCH] better systemd integration

2016-01-28 Thread Peter Eisentraut
On 1/28/16 4:00 AM, Pavel Stehule wrote: > Hi > > 2016-01-28 3:50 GMT+01:00 Peter Eisentraut >: > > On 1/27/16 7:02 AM, Pavel Stehule wrote: > > The issues: > > > > 1. configure missing systemd integration test, compilation fails: >

Re: [HACKERS] [PATCH] better systemd integration

2016-01-28 Thread Alvaro Herrera
I wonder if instead of HAVE_SYSTEMD at each callsite we shouldn't instead have a pg_sd_notify() call that's a no-op when not systemd. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers

Re: [HACKERS] [PATCH] better systemd integration

2016-01-27 Thread Peter Eisentraut
On 1/27/16 7:02 AM, Pavel Stehule wrote: > The issues: > > 1. configure missing systemd integration test, compilation fails: > > postmaster.o postmaster.c > postmaster.c:91:31: fatal error: systemd/sd-daemon.h: No such file or > directory Updated patch attached that fixes this by adding

Re: [HACKERS] [PATCH] better systemd integration

2016-01-27 Thread Pavel Stehule
Hi 2015-11-17 15:08 GMT+01:00 Peter Eisentraut : > 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

Re: [HACKERS] [PATCH] better systemd integration

2016-01-20 Thread Pavel Stehule
2016-01-21 3:33 GMT+01:00 Peter Eisentraut : > On 1/18/16 10:58 AM, Alvaro Herrera wrote: > > Peter Eisentraut wrote: > >> I have written a couple of patches to improve the integration of the > >> postgres daemon with systemd. > > > > Great. Is anything happening with these

Re: [HACKERS] [PATCH] better systemd integration

2016-01-20 Thread Peter Eisentraut
On 1/18/16 10:58 AM, Alvaro Herrera wrote: > Peter Eisentraut wrote: >> I have written a couple of patches to improve the integration of the >> postgres daemon with systemd. > > Great. Is anything happening with these patches, or? They've been > inactive for quite a while now. Well, they are

Re: [HACKERS] [PATCH] better systemd integration

2016-01-18 Thread Alvaro Herrera
Peter Eisentraut wrote: > I have written a couple of patches to improve the integration of the > postgres daemon with systemd. Great. Is anything happening with these patches, or? They've been inactive for quite a while now. -- Álvaro Herrerahttp://www.2ndQuadrant.com/

Re: [HACKERS] [PATCH] better systemd integration

2015-11-17 Thread Tom Lane
Peter Eisentraut writes: > I have written a couple of patches to improve the integration of the > postgres daemon with systemd. Seems like a generally reasonable thing to do. systemd is probably not going away (unfortunately IMO, but there it is). > The second patch improves

[HACKERS] [PATCH] better systemd integration

2015-11-17 Thread Peter Eisentraut
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