[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [HACKERS] [PATCH] better systemd integration
From:       Pavel Stehule <pavel.stehule () gmail ! com>
Date:       2016-01-30 21:51:03
Message-ID: CAFj8pRB++J2Fb=94V+8fJ5nruz4pKmE6D+Pr6qpBwaMP1D+kyg () mail ! gmail ! com
[Download RAW message or body]

2016-01-30 22:38 GMT+01:00 Peter Eisentraut <peter_e@gmx.net>:

> 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.
>

probably no other is safe

Pavel

[Attachment #3 (text/html)]

<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-01-30 \
22:38 GMT+01:00 Peter Eisentraut <span dir="ltr">&lt;<a href="mailto:peter_e@gmx.net" \
target="_blank">peter_e@gmx.net</a>&gt;</span>:<br><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span \
class="">On 1/29/16 4:15 PM, Pavel Stehule wrote:<br> &gt; Hi<br>
&gt;<br>
&gt;        &gt;<br>
&gt;        &gt;<br>
&gt;        &gt; You sent only rebased code of previous version. I didn&#39;t find \
additional<br> &gt;        &gt; checks.<br>
&gt;<br>
&gt;        Oops.   Here is the actual new code.<br>
&gt;<br>
&gt;<br>
&gt; New test is working as expected<br>
&gt;<br>
&gt; I did lot of tests - and this code works perfect in single server mode,<br>
&gt; and with slave hot-standby mode.<br>
&gt;<br>
&gt; It doesn&#39;t work with only standby mode<br>
<br>
</span>Yeah, I hadn&#39;t though of that.   How about this change in addition:<br>
<br>
diff --git a/src/backend/postmaster/postmaster.c \
b/src/backend/postmaster/postmaster.c<br> index 2e7f1d7..d983a50 100644<br>
--- a/src/backend/postmaster/postmaster.c<br>
+++ b/src/backend/postmaster/postmaster.c<br>
@@ -4933,6 +4933,11 @@ sigusr1_handler(SIGNAL_ARGS)<br>
            if (XLogArchivingAlways())<br>
                  PgArchPID = pgarch_start();<br>
<br>
+#ifdef USE_SYSTEMD<br>
+           if (!EnableHotStandby)<br>
<span class="">+                 sd_notify(0, &quot;READY=1&quot;);<br>
+#endif<br>
+<br>
</span>            pmState = PM_RECOVERY;<br>
      }<br>
      if (CheckPostmasterSignal(PMSIGNAL_BEGIN_HOT_STANDBY) &amp;&amp;<br>
<span class=""><br>
&gt; Default timeout on FC is 90 sec - it is should not to be enough for<br>
&gt; large servers with large shared buffers and high checkpoint segments. It<br>
&gt; should be mentioned in service file.<br>
<br>
</span>Good point.   I think we should set TimeoutSec=0 in the suggested service \
file.<br></blockquote><div><br></div><div>probably no other is \
safe<br><br></div><div>Pavel<br>  <br></div></div><br></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic