From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid dangling-pointer usage in pg_basebackup progress reports.
Date: Thu, 17 Feb 2022 20:03:47 +0000
Message-ID: <E1nKn0F-0007yX-EP@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Avoid dangling-pointer usage in pg_basebackup progress reports.
In-Reply-To: <E1nKn0F-0007yX-EP@gemulon.postgresql.org>
References: <E1nKn0F-0007yX-EP@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox