From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Quick exit on log stream child exit in pg_basebackup
Date: Wed, 23 Feb 2022 13:32:03 +0000
Message-ID: <E1nMrkR-000Hod-W0@gemulon.postgresql.org> (raw)
Quick exit on log stream child exit in pg_basebackup
If the log streaming child process (thread on Windows) dies during
backup then the whole backup will be aborted at the end of the
backup. Instead, trap ungraceful termination of the log streaming
child and exit early. This also adds a TAP test for simulating this
by terminating the responsible backend.
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Magnus Hagander <magnus@hagander.net>
Discussion: https://postgr.es/m/0F69E282-97F9-4DB7-8D6D-F927AA6340C8@yesql.se
Discussion: https://postgr.es/m/VI1PR83MB0189818B82C19059CB62E26199A89@VI1PR83MB0189.EURPRD83.prod.outlook.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0475a97f744d2fea3676b2e69405d20358eac07a
Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 47 ++++++++++++++++++++++++++--
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 34 ++++++++++++++++++++
2 files changed, 79 insertions(+), 2 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: dgustafsson@postgresql.org
Subject: Re: pgsql: Quick exit on log stream child exit in pg_basebackup
In-Reply-To: <E1nMrkR-000Hod-W0@gemulon.postgresql.org>
References: <E1nMrkR-000Hod-W0@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