pgsql: Add block information in error context of WAL REDO apply loop

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add block information in error context of WAL REDO apply loop
Date: 2020-10-02 00:41:12
Message-ID: E1kO98K-0006o4-Uz@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add block information in error context of WAL REDO apply loop

Providing this information can be useful for example when diagnosing
problems related to recovery conflicts or for recovery issues without
having to go through the output generated by pg_waldump to get some
information about the blocks a WAL record works on.

The block information is printed in the same format as pg_waldump. This
already existed in xlog.c for debugging purposes with -DWAL_DEBUG, so
adding the block information in the callback has required just a small
refactoring.

Author: Bertrand Drouvot
Reviewed-by: Michael Paquier, Masahiko Sawada
Discussion: https://postgr.es/m/c31e2cba-efda-762c-f4ad-5c25e5dac3d0@amazon.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9d0bd95fa90a7243047a74e29f265296a9fc556d

Modified Files
--------------
src/backend/access/transam/xlog.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2020-10-02 01:19:04 pgsql: Add pg_stat_wal statistics view.
Previous Message Tom Lane 2020-10-01 14:59:37 pgsql: Put back explicit setting of replication values within TAP tests