Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: michael@paquier.xyz
Cc: robertmhaas@gmail.com, kuroda.hayato@fujitsu.com,
shlok.kyal.oss@gmail.com, pgsql-hackers@lists.postgresql.org,
tgl@sss.pgh.pa.us
Date: 2024-06-06T08:21:46Z
Lists: pgsql-hackers
At Thu, 06 Jun 2024 17:15:15 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in > At Thu, 06 Jun 2024 16:45:00 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in > > I have been thinking about this since then. At first, I thought it > > referred to FindFirstChangeNotification() and friends, and inotify on > > Linux. However, I haven't found a way to simplify the specified code > > area using those APIs. > > By the way, the need to shift by 2 seconds to tolerate clock skew > suggests that the current launcher-postmaster association mechanism is > somewhat unreliable. Couldn't we add a command line option to > postmaster to explicitly pass a unique identifier (say, pid itself) of > the launcher? If it is not specified, the number should be the PID of > the immediate parent process. No. The combination of pg_ctl's pid and timestamp, to avoid false matching during reboot. > This change avoids the need for the special treatment for Windows. regards. -- Kyotaro Horiguchi NTT Open Source Software Center
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