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: Noah Misch <noah@leadboat.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, robertmhaas@gmail.com, kuroda.hayato@fujitsu.com, shlok.kyal.oss@gmail.com, pgsql-hackers@lists.postgresql.org, tgl@sss.pgh.pa.us
Date: 2024-07-05T05:19:54Z
Lists: pgsql-hackers
On Sat, Jun 29, 2024 at 07:12:11PM -0700, Noah Misch wrote: > Commits 9886744 and b83747a added /D to two %comspec% callers. I gather they > arose to make particular cmd.exe invocations have just one child. However, > http://postgr.es/m/20240111.173322.1809044112677090191.horikyota.ntt@gmail.com > reports multiple children remain possible. v17 is currently in a weird state > where most Windows subprocess invocation routes through pgwin32_system() and > does not add /D, while these two callers add /D. I suspect we should either > (1) prepend /D in pgwin32_system() and other %comspec% usage or (2) revert > prepending it in the callers from this thread's commits. While > "Software\Microsoft\Command Processor\AutoRun" is hard to use without breaking > things, it's not PostgreSQL's job to second-guess the user in that respect. > Hence, I lean toward (2). What do you think? Thanks for the ping. As of this stage of the game for v17, I am going to agree with (2) to remove this inconsistency rather than experiment with new things. We could always study more in v18 what could be done with the /D switches and the other patch, though that will unlikely be something I'll be able to look at in the short term. -- 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