Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, orlovmg@gmail.com, alvherre@alvh.no-ip.org, nathandbossart@gmail.com, pgsql-hackers@lists.postgresql.org
Date: 2022-12-19T08:07:35Z
Lists: pgsql-hackers
Attachments
- v6-0001-Add-utility-functions-to-disset-WAL-file-name-and.patch (text/x-diff) patch v6-0001
On Tue, Dec 13, 2022 at 09:32:19PM +0530, Bharath Rupireddy wrote: > Okay, here's the v5 patch that I could come up with. It basically adds > functions for dissecting WAL file names and computing offset from lsn. > Thoughts? I had a second look at that, and I still have mixed feelings about the addition of the SQL function, no real objection about pg_dissect_walfile_name(). I don't really think that we need a specific handling with a new macro from xlog_internal.h that does its own parsing of the segment number while XLogFromFileName() can do that based on the user input, so I have simplified that. A second thing is the TLI that had better be returned as int8 and not int4 so as we don't have a negative number for a TLI higher than 2B in a WAL segment name. -- Michael
Commits
-
Rename pg_dissect_walfile_name() to pg_split_walfile_name()
- 13e0d7a60385 16.0 landed
-
Add pg_dissect_walfile_name()
- cca186348929 16.0 landed
-
Add LSN location in some error messages related to WAL pages
- 71cb84ec69a3 16.0 landed