pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: sobomax@freebsd.org
Cc: pgsql-bugs@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [BUGS] BUG #14199: The pg_ctl status check on server start is not compatible with the silent_mode=on
Date: Sat, 18 Jun 2016 11:51:10 -0400
Message-ID: <13340.1466265070@sss.pgh.pa.us> (raw)
In-Reply-To: <20160618042812.5798.85609@wrigleys.postgresql.org>
References: <20160618042812.5798.85609@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

sobomax@freebsd.org writes:
> There is a problem with pg_ctl when it tries to start server with the
> "silent_mode=on" option enabled in postgresql.conf. Specifically, this
> option causes postgres to fork once more after start. There are two problems
> caused by that:
> 1. The pm_pid recorded by the pg_ctl when doing fork+execve no longer
> matches the PID in the postmaster.pid file. This causes pg_ctl bail out
> immediately.
> 2. Method that pg_ctl uses to poll if postgres exited prematurely no longer
> works.

> For some reason it was not a problem until recently.

After reviewing recent commits, I realize that this was caused by
https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=c869a7d5b
While generally that was a good thing, in hindsight it's obvious that
it doesn't work with silent_mode.  That's a non-issue in 9.2 and later
since silent_mode is gone anyway, but it is an issue for 9.1.

> Attached patch fixes that issue by changing the way pg_ctl polls on the
> child status.

There is no need of this complication in >= 9.2.  We could maybe apply it
in the 9.1 branch only, but I am quite loath to accept such a nontrivial
and portability-sensitive change that way.  The main reason being that
9.1 is almost EOL: its next minor release might well be its last.  If
there's anything wrong with this approach, we may not find out about it
until after 9.1 is out of support and won't get patched anymore.

What seems like a more conservative answer to me is to revert c869a7d5b
in 9.1 only, and address the buildfarm stability issue it sought to
resolve by increasing the fixed timeout from 5 seconds to, say, 10.

Thoughts?

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (5+ messages)  latest in thread

Message-ID: <13340.1466265070@sss.pgh.pa.us>
Permalink:  ../13340.1466265070@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13340.1466265070@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sobomax@freebsd.org, pgsql-hackers@postgresql.org
  Subject: Re: [BUGS] BUG #14199: The pg_ctl status check on server start is not compatible with the silent_mode=on
  In-Reply-To: <13340.1466265070@sss.pgh.pa.us>
  References: <20160618042812.5798.85609@wrigleys.postgresql.org> <13340.1466265070@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox