Avoid dangling-pointer usage in pg_basebackup progress reports.
Tom Lane <tgl@sss.pgh.pa.us>
Avoid dangling-pointer usage in pg_basebackup progress reports. Ill-considered refactoring in 23a1c6578 led to progress_filename sometimes pointing to data that had gone out of scope. The most bulletproof fix is to hang onto a copy of whatever's passed in. Compared to the work spent elsewhere per file, that's not very expensive, plus we can skip it except in verbose logging mode. Per buildfarm. Discussion: https://postgr.es/m/20220212211316.GK31460@telsasoft.com
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_basebackup/pg_basebackup.c | modified | +16 −5 |
Discussion
- buildfarm warnings 16 messages · 2022-02-12 → 2022-02-18