model-writtenrun 8776 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jonathan Katz reported that PostgreSQL 12.2 could not start with a new logfile on Windows Server 2012 and 2016, while existing files with suitable permissions worked, and suggested avoiding creation of missing logfiles in #1.
- Tom Lane questioned why the buildfarm had missed the regression in #2; Heath Lord explained that Dory had permissive directory settings and that the failure occurred outside the user's home directory in #4.
- Tom initially considered changing Windows file security attributes in #5, but Heath identified the decisive privilege mismatch: pg_ctl created the logfile as Administrator before launching CMD.EXE and PostgreSQL with restricted privileges in #6.
- Tom proposed opening only existing logfiles for reading, preserving the wait for a previous postmaster to release the file, and suggested using open() instead of fopen() in #7.
- Alexander Lakhin demonstrated that read-only access failed to preserve the sharing-violation workaround and supplied #8, using O_RDWR without O_CREAT and ignoring only ENOENT; he also reported later elevated-prompt test failures that he considered unrelated.
- After Tom requested testing in #9, Heath built the patch on a fresh VM and confirmed that the original failure was fixed and his normal test scenarios passed in #10.
- Tom committed #8 with expanded comments and formatting adjustments as e02ea141ee, with a backport to PostgreSQL 12, and announced the push in #11; the logfile fix was complete, while Alexander's separate elevated-prompt failures remained outside this fix.