Re: xlog.c: removing ReadRecPtr and EndRecPtr

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Amul Sul <sulamul(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: xlog.c: removing ReadRecPtr and EndRecPtr
Date: 2021-11-19 19:59:12
Message-ID: 202111191959.4zjecmtht3vk@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Nov-18, Robert Haas wrote:

> On Thu, Nov 18, 2021 at 2:21 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> > Would it work to start postmaster directly instad of using pg_ctl, and
> > then rely on (say) pg_isready?
>
> I *think* that pg_isready would also fail, because the documentation
> says "pg_isready returns 0 to the shell if the server is accepting
> connections normally, 1 if the server is rejecting connections (for
> example during startup) ..." and I believe the "during startup" case
> would apply here.

Hmm, right ... I suppose there are other ways to check, but I'm not sure
that the value of adding this particular test is large enough to justify
such hacks.

I think one possibly useful technique might be Alexander Korotkov's stop
events[1], except that it is designed around having working SQL access
to the server in order to control it. You'd need some frosting on top
in order to control the startup sequence without SQL access.

> Starting postmaster directly is a thought. Is there any existing
> precedent for that approach?

Not as far as I can see.

[1] https://postgr.es/m/CAPpHfdtSEOHX8dSk9Qp+Z++i4BGQoffKip6JDWngEA+g7Z-XmQ@mail.gmail.com

--
Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/
"Entristecido, Wutra (canción de Las Barreras)
echa a Freyr a rodar
y a nosotros al mar"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marcos Pegoraro 2021-11-19 20:09:36 Re: update with no changes
Previous Message Tomas Vondra 2021-11-19 19:54:46 Re: logical decoding and replication of sequences