| From: | Fujii Masao <fujii(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Stop WAL streaming on timeline history file write failures |
| Date: | 2026-11-18 04:32:44 |
| Message-ID: | E1xTXLf-00000000Bj9-0QWX@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Stop WAL streaming on timeline history file write failures
pg_basebackup and pg_receivewal could continue streaming WAL after
failing to write a timeline history file, leaving the backup or WAL
archive without a file needed for recovery.
ReceiveXlogStream() ignored the return value of
writeTimeLineHistoryFile(), which reports errors and returns false
on failure. Check the return value and stop the current streaming
attempt if the write fails.
Backpatch to all supported versions.
Author: Chao Li <lic(at)highgo(dot)com>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: Surya Poondla <suryapoondla4(at)gmail(dot)com>
Discussion: https://postgr.es/m/530B55ED-C7F7-441C-BBC0-6F3F9901E414@gmail.com
Backpatch-through: 15
Branch
------
REL_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/f8b67085ddba9121f494f08d82ef4bfc5dc8431c
Modified Files
--------------
src/bin/pg_basebackup/receivelog.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-11-18 04:32:54 | pgsql: Stop WAL streaming on timeline history file write failures |
| Previous Message | Fujii Masao | 2026-11-18 04:32:32 | pgsql: Fix handling of backend crashes during standby promotion |