model-writtenrun 9620 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut opened the thread by explaining how inherited libpq environment variables distort replication behavior in TAP tests and proposing ways to control that inheritance #1; Dmitriy Igrishin supported an environment-ignoring libpq mode for wrappers that hide libpq #2.
- Peter instead submitted an environment GUC and a pg_ctl --clear-environment option, using the GUC to restore required settings such as LDAPCONF after clearing the test server's environment #3.
- Noah Misch opposed clearing the entire environment because Windows and buildfarm installations need variables such as PATH and LD_LIBRARY_PATH, recommended clearing only PGAPPNAME, and identified validation, reload, and memory-leak problems in the GUC implementation #4.
- Peter replaced the broad features with a patch that temporarily removes PGAPPNAME around test pg_ctl invocations and eliminates redundant application_name overrides in replication tests #5.
- Noah suggested scoped Perl environment handling #6; Peter identified that the proposed spelling cleared the whole environment and questioned older Perl support for delete local #7; Dagfinn Ilmari Mannsåker supplied local %ENV = %ENV and demonstrated the older-Perl limitation #8, which Noah then endorsed #9.
- Peter committed the narrowed patch from #5 with scoped environment restoration as 8e93a516e6 and confirmed completion in #10; the general environment GUC and pg_ctl clearing option were left out following the portability and compatibility objections.