Print physical file path when checksum check fails

From: Hubert Zhang <hzhang(at)pivotal(dot)io>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Print physical file path when checksum check fails
Date: 2020-02-10 08:04:21
Message-ID: CAB0yre=Ghu7Ux0DN4P5tdAkS_XcXyBzW4_EW5tHvhPCNSBU5HQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hacker,

Currently we only print block number and relation path when checksum check
fails. See example below:

ERROR: invalid page in block 333571 of relation base/65959/656195

DBA complains that she needs additional work to calculate which physical
file is broken, since one physical file can only contain `RELSEG_SIZE`
number of blocks. For large tables, we need to use many physical files with
additional suffix, e.g. 656195.1, 656195.2 ...

Is that a good idea to also print the physical file path in error message?
Like below:

ERROR: invalid page in block 333571 of relation base/65959/656195, file
path base/65959/656195.2

Patch is attached.
--
Thanks

Hubert Zhang

Attachment Content-Type Size
0001-Print-physical-file-path-when-checksum-check-fails.patch application/octet-stream 4.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-02-10 08:22:13 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Previous Message Fujii Masao 2020-02-10 07:58:56 pg_basebackup -F plain -R overwrites postgresql.auto.conf