| From: | Fujii Masao <fujii(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix incorrect LSNs in WAL decoding error messages |
| Date: | 2026-11-03 01:53:45 |
| Message-ID: | E1xO3ib-00000001sUZ-0VmV@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix incorrect LSNs in WAL decoding error messages
Commit 3f1ce97346 introduced a circular WAL decoding buffer,
allowing records to be decoded before they are consumed. However,
decoding error messages continued to report the location of the last
record consumed instead of the record that failed decoding. With
recovery prefetching, the reported location could be many records
behind the failing record, making WAL problems harder to diagnose.
Fix this by reporting the location of the record being decoded.
Errors now identify the failing record even with recovery prefetching,
making it easier to investigate malformed WAL during recovery or with
tools such as pg_waldump and pg_walinspect.
Backpatch to v15, where the WAL decoding buffer was introduced.
Author: Rahul Yadav <rahul(at)rhyadav(dot)dev>
Reviewed-by: Surya Poondla <suryapoondla4(at)gmail(dot)com>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Discussion: https://postgr.es/m/P2qIkq4--F-9@rhyadav.dev
Backpatch-through: 15
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/472da35ac0e2ecf33419a7b6874fa5ba909a23d4
Modified Files
--------------
src/backend/access/transam/xlogreader.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-11-03 01:53:58 | pgsql: Fix lost wakeups in physical WAL senders |
| Previous Message | Fujii Masao | 2026-11-03 01:53:27 | pgsql: Fix lost wakeups in physical WAL senders |