From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Strange error in new 003_cic_2pc.pl test |
Date: | 2021-11-11 16:20:28 |
Message-ID: | 458031636647628@iva8-dc7983bf477b.qloud-c.yandex.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> tadarida just reported this [1]:
>
> 2021-11-11 14:40:40.040 CET [29620:388] 023_cic_2pc.pl ERROR: could not read two-phase state from WAL at 0/1716C68
>
> That error message is remarkably unhelpful, and I think unnecessarily so.
> Why the heck isn't XlogReadTwoPhaseData passing on the error string
> that it just got from XLogReadRecord?
>
> Now, XLogReadRecord's API spec does say it might return NULL errormsg
> if "the page read callback already reported the error". But there's
> no sign of that in tadarida's log. Anyway, I have in mind to do
>
> ereport(ERROR,
> (errcode_for_file_access(),
> - errmsg("could not read two-phase state from WAL at %X/%X",
> - LSN_FORMAT_ARGS(lsn))));
> + errmsg("could not read two-phase state from WAL at %X/%X: %s",
> + LSN_FORMAT_ARGS(lsn),
> + errormsg ? errormsg : "(no details available)")));
>
Noah recently proposed the same [0]. But responders like me started to complain about other places without error reporting around xlog reading.
Probably I had to be more clear on the matter. Error logging certainly worth doing, at least this.
Thanks!
Best regards, Andrey Borodin.
[0] https://www.postgresql.org/message-id/flat/20211107013157.GB790288%40rfd.leadboat.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-11-11 16:52:49 | Re: Strange error in new 003_cic_2pc.pl test |
Previous Message | Laurenz Albe | 2021-11-11 16:16:55 | Re: Should AT TIME ZONE be volatile? |