pgsql: Avoid dangling-pointer usage in pg_basebackup progress reports.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Avoid dangling-pointer usage in pg_basebackup progress reports.
Дата
Msg-id E1nKn0F-0007yX-EP@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/62cb7427d1e491faf8612a82c2e3711a8cd65422

Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Add missing binary-upgrade guard.
Следующее
От: Amit Kapila
Дата:
Сообщение: pgsql: Fix a comment in worker.c.