Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Cc: 'PostgreSQL Hackers' <pgsql-hackers@lists.postgresql.org>
Date: 2023-09-07T07:37:08Z
Lists: pgsql-hackers
On Thu, Sep 07, 2023 at 07:07:36AM +0000, Hayato Kuroda (Fujitsu) wrote: > # Problem > > The "pg_ctl start" command returns 0 (succeeded) even if the cluster has > already been started. This occurs on Windows environment, and when the command > is executed just after postmaster starts. Not failing on `pg_ctl start` if the command is run on a data folder that has already been started previously by a different command with a postmaster still alive feels like cheating, because pg_ctl is lying about its result. If pg_ctl wants to start a cluster but is not able to do it, either because the postmaster failed at startup or because the cluster has already started, it should report a failure. Now, I also recall that the processes spawned by pg_ctl on Windows make the status handling rather tricky to reason about.. -- Michael
Commits
-
Re-enable autoruns for cmd.exe on Windows
- 74b8e6a69802 18.0 landed
-
Re-enable autoruns for for cmd.exe on Windows
- fa1a63dffcd7 17.0 landed
-
pg_regress: Disable autoruns for cmd.exe on Windows
- e50a52b2b448 12.18 landed
- 2a0eb80ae4ad 13.14 landed
- 4a7475e9a332 14.11 landed
- 7e7d827f57b9 15.6 landed
- 506c77f9b2e5 16.2 landed
- b83747a8a65b 17.0 landed
-
pg_ctl: Disable autoruns for cmd.exe on Windows
- 9e70e6564fc8 12.18 landed
- c8aab699edd6 13.14 landed
- 4c6944223ef4 14.11 landed
- 33d1be06aee0 15.6 landed
- 714bfb7813ed 16.2 landed
- 9886744a361b 17.0 landed