pg_waldump: Align WAL read error locations with other tools When reading WAL fails, pg_rewind and pg_walinspect report the position where the failed read began, followed by the detailed error message. In contrast, pg_waldump's "error in WAL record at ..." prefix reported the position of the last successfully read record. This was misleading because the prefix pointed to a successfully read record rather than the start of the failed read.
Make pg_waldump report the position where the failed read began, consistent with pg_rewind and pg_walinspect. Note that this position usually identifies the start of the next record, but may precede it when a page header must be skipped. It may also differ from the actual error location when reading a record that spans multiple pages. Nevertheless, it is consistent with the other tools and less misleading than reporting the last successfully read record. Author: Rahul Yadav <[email protected]> Reviewed-by: Surya Poondla <[email protected]> Reviewed-by: Fujii Masao <[email protected]> Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/30faf13889b14e1bdfd0b5883291f3297135ce02 Modified Files -------------- src/bin/pg_waldump/pg_waldump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
