model-writtenrun 9051 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Cili reported that a fake cmd.exe in the current directory caused pg_ctl to launch Calculator instead of PostgreSQL on Windows #1; Tom Lane initially regarded this as system misconfiguration rather than a PostgreSQL bug #2.
- Juan José SantamarÃa Flecha explained that Windows searched for CMD while other platforms used an absolute shell path #3, then proposed COMSPEC after Tom questioned how to locate cmd.exe reliably #4 #5; Tom accepted using the variable when set while stressing that this provided no security guarantee #6.
- Juan submitted a patch making pg_ctl use a quoted COMSPEC path, falling back to CMD when the variable was absent #7.
- Tom's review found that psql already used COMSPEC and requested the same fix for pg_regress, while leaving pg_upgrade's shell-script references unchanged and retaining the fixed Bourne shell for noninteractive Unix commands #8; Juan agreed and extended the patch to pg_regress #9.
- Tom committed the revised patch as f88544904e with light declaration and comment cleanup, declining backpatching because its status as a bug fix versus a behavioral change was debatable.
- The thread ended with Tom confirming that the patch was pushed and explaining that he could not test it locally, leaving Windows validation to the buildfarm #10.