On 2021-Nov-18, Robert Haas wrote: > On Thu, Nov 18, 2021 at 2:21 PM Alvaro Herrera <alvhe...@alvh.no-ip.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-...@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"