Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures
| От | Nathan Bossart |
|---|---|
| Тема | Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures |
| Дата | |
| Msg-id | 20220919221642.GA21823@nathanxps13 обсуждение исходный текст |
| Ответ на | Add LSN along with offset to error messages reported for WAL file read/write/validate header failures (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>) |
| Ответы |
Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures
|
| Список | pgsql-hackers |
On Mon, Sep 19, 2022 at 07:26:57PM +0530, Bharath Rupireddy wrote: > We have a bunch of messages [1] that have an offset, but not LSN in > the error message. Firstly, is there an easiest way to figure out LSN > from offset reported in the error messages? If not, is adding LSN to > these messages along with offset a good idea? Of course, we can't just > convert offset to LSN using XLogSegNoOffsetToRecPtr() and report, but > something meaningful like reporting the LSN of the page that we are > reading-in or writing-out etc. It seems like you want the opposite of pg_walfile_name_offset(). Perhaps we could add a function like pg_walfile_offset_lsn() that accepts a WAL file name and byte offset and returns the LSN. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: