Re: detailed error message of pg_waldump

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: detailed error message of pg_waldump
Дата
Msg-id CAD21AoD_mHKsYSVbL3JgCqz3QeAdPKhkybgdvtjj+hpMaHkqHg@mail.gmail.com
обсуждение исходный текст
Ответ на detailed error message of pg_waldump  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: detailed error message of pg_waldump  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Fri, Jun 4, 2021 at 5:35 PM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
>
> In a very common operation of accidentally specifying a recycled
> segment, pg_waldump often returns the following obscure message.
>
> $ pg_waldump 00000001000000000000002D
> pg_waldump: fatal: could not find a valid record after 0/2D000000
>
> The more detailed message is generated internally and we can use it.
> That looks like the following.
>
> $ pg_waldump 00000001000000000000002D
> pg_waldump: fatal: unexpected pageaddr 0/24000000 in log segment 00000001000000000000002D, offset 0
>
> Is it work doing?

Perhaps we need both? The current message describes where the error
happened and the message internally generated describes the details.
It seems to me that both are useful. For example, if we find an error
during XLogReadRecord(), we show both as follows:

   if (errormsg)
       fatal_error("error in WAL record at %X/%X: %s",
                   LSN_FORMAT_ARGS(xlogreader_state->ReadRecPtr),
                   errormsg);

Regards,

-- 
Masahiko Sawada
EDB:  https://www.enterprisedb.com/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Error on pgbench logs
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints