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

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: shlok(dot)kyal(dot)oss(at)gmail(dot)com
Cc: kuroda(dot)hayato(at)fujitsu(dot)com, michael(at)paquier(dot)xyz, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows
Date: 2023-10-10 01:52:55
Message-ID: 20231010.105255.1517046444304524293.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you for testing this!

At Fri, 6 Oct 2023 12:28:32 +0530, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com> wrote i> D:\project\pg_dev\bin>pg_ctl -D ../data -l data2.log start
> pg_ctl: another server might be running; trying to start server anyway
> waiting for server to start....pg_ctl: launcher shell died
>
> The output message after patch is different from the HEAD. I felt that
> with patch as well we should get the message "pg_ctl: could not start
> server".
> Is this message change intentional?

Partly no, partly yes. My focus was on verifying the accuracy of
identifying the actual postmaster PID on Windows. The current patch
provides a detailed description of the events, primarily because I
lack a comprehensive understanding of both the behavior of Windows
APIs and the associated processes. Given that context, the messages
essentially serve debugging purposes.

I agree with your suggestion. Ultimately, if there's a possibility
for this to be committed, the message will be consolidated to "could
not start server".

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2023-10-10 02:59:06 Re: Making aggregate deserialization (and WAL receive) functions slightly faster
Previous Message Kyotaro Horiguchi 2023-10-10 01:29:05 Re: Included xid in restoring reorder buffer changes from disk log message