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 <[email protected]>
Reviewed-by: Bharath Rupireddy <[email protected]>
Reviewed-by: Magnus Hagander <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Discussion: 
https://postgr.es/m/vi1pr83mb0189818b82c19059cb62e26199...@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 via email to