Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Bryan Green <dbryan(dot)green(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Sutou Kouhei <kou(at)clear-code(dot)com>, michael(at)paquier(dot)xyz, robertmhaas(at)gmail(dot)com, horikyota(dot)ntt(at)gmail(dot)com, kuroda(dot)hayato(at)fujitsu(dot)com, shlok(dot)kyal(dot)oss(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows
Date: 2026-02-02 13:28:36
Message-ID: 202602021323.y4ctu6t5biso@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

Somebody seems to have trimmed the CC field upthread for no apparent
reason. I put it back the way I think it was when that happened.

Here's a rebased version of this patch. This is pretty much just
Bryan's patch, which I agree is a good way forward, though perhaps not
very backpatchable. I suspect we need to consider this one for mastern
only, and use a less intrusive version for backpatching -- perhaps
Kyotaro's earlier version.

Regarding this patch, I haven't really reviewed it -- but I wonder why
we need two global variables to keep postmaster's PID: the newly
introduced pm_pid (which was previously a local variable only) and the
preexisting postmasterPID. I suspect this needs to be cleaned up.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"Los minutos y los segundos son mercadería de la ciudad, donde un infeliz se
afana por no perder ni siquiera un segundo y no advierto que obrando de ese
modo pierde una vida." ("La vuelta de Don Camilo", G. Guareschi)

Attachment Content-Type Size
v3-0001-Fix-pg_ctl-on-Windows-to-reliably-detect-already-.patch text/x-diff 21.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Aditya Kamath 2026-02-02 14:01:31 RE: AIX support
Previous Message Tatsuya Kawata 2026-02-02 13:09:01 Re: [PATCH] ANALYZE: hash-accelerate MCV tracking for equality-only types