Quick exit on log stream child exit in pg_basebackup
Daniel Gustafsson <dgustafsson@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_basebackup/pg_basebackup.c | modified | +45 −2 |
| src/bin/pg_basebackup/t/010_pg_basebackup.pl | modified | +34 −0 |
Discussion
- pg_basebackup behavior on non-existent slot 4 messages · 2021-09-28 → 2021-09-29
- Trap errors from streaming child in pg_basebackup to exit early 16 messages · 2021-08-26 → 2022-02-23