Re: [PATCH] better systemd integration - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] better systemd integration
Date
Msg-id 56AD2D41.7050102@gmx.net
Whole thread Raw
In response to Re: [PATCH] better systemd integration  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [PATCH] better systemd integration  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: [PATCH] better systemd integration  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
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 perfect in single server mode,
> and with slave hot-standby mode.
> 
> It doesn't work with only standby mode

Yeah, I hadn't though of that.  How about this change in addition:

diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
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 (!EnableHotStandby)
+           sd_notify(0, "READY=1");
+#endif
+       pmState = PM_RECOVERY;   }   if (CheckPostmasterSignal(PMSIGNAL_BEGIN_HOT_STANDBY) &&

> Default timeout on FC is 90 sec - it is should not to be enough for
> large servers with large shared buffers and high checkpoint segments. It
> should be mentioned in service file.

Good point.  I think we should set TimeoutSec=0 in the suggested service file.




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] better systemd integration
Next
From: Pavel Stehule
Date:
Subject: Re: [PATCH] better systemd integration