pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: Reducing pg_ctl's reaction time
Date: Mon, 26 Jun 2017 17:38:03 -0400
Message-ID: <15732.1498513083@sss.pgh.pa.us> (raw )
In-Reply-To: <20170626213414.ejcesidei2hv4h5x@alap3.anarazel.de >
References: <CAB7nPqTWWBEZ6NN_pbgmU=yn-HZNKGY3nAivvLSuLPe61n1KJw@mail.gmail.com >
<24992.1498504537@sss.pgh.pa.us >
<CAMkU=1xJW8e+CTotojOMBd-yzUvD0e_JZu2xHo=MnuZ4__m7Pg@mail.gmail.com >
<18520.1498508356@sss.pgh.pa.us >
<20170626202356.qybnpn5li2ke4ioc@alap3.anarazel.de >
<18890.1498508760@sss.pgh.pa.us >
<20170626203347.6efkdwiadyt33edy@alap3.anarazel.de >
<19812.1498510147@sss.pgh.pa.us >
<20170626205853.ezhnmxpotdy3wokm@alap3.anarazel.de >
<15166.1498512630@sss.pgh.pa.us >
<20170626213414.ejcesidei2hv4h5x@alap3.anarazel.de >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Andres Freund <andres@anarazel.de> writes:
> On 2017-06-26 17:30:30 -0400, Tom Lane wrote:
>> No, I don't like that at all. Has race conditions against updates
>> coming from the startup process.
> You'd obviously have to take the appropriate locks. I think the issue
> here is less race conditions, and more that architecturally we'd
> interact with shmem too much.
Uh, we are *not* taking any locks in the postmaster.
>> Yeah, that would be a different way to go at it. The postmaster would
>> probably just write the state of the hot_standby GUC to the file, and
>> pg_ctl would have to infer things from there.
> I'd actually say we should just mirror the existing
> #ifdef USE_SYSTEMD
> if (!EnableHotStandby)
> sd_notify(0, "READY=1");
> #endif
> with corresponding pidfile updates - doesn't really seem necessary for
> pg_ctl to do more?
Hm. Take that a bit further, and we could drop the connection probes
altogether --- just put the whole responsibility on the postmaster to
show in the pidfile whether it's ready for connections or not.
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 (29+ messages) latest in thread
Message-ID: <15732.1498513083@sss.pgh.pa.us>
Permalink: ../15732.1498513083@sss.pgh.pa.us/
Also on: postgresql.org/message-id/15732.1498513083@sss.pgh.pa.us
copy link · copy postgr.es
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, jeff.janes@gmail.com, michael.paquier@gmail.com
Subject: Re: Reducing pg_ctl's reaction time
In-Reply-To: <15732.1498513083@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