| From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Make some xlogreader messages more accurate |
| Date: | 2023-02-23 07:35:47 |
| Message-ID: | 726d782b-5e45-0c3e-d775-6686afe9aa83@enterprisedb.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Here is a small patch to make some invalid-record error messages in
xlogreader a bit more accurate (IMO).
My starting point was that when you have some invalid WAL, you often get
a message like "wanted 24, got 0". This is a bit incorrect, since it
really wanted *at least* 24, not exactly 24. So I have updated the
messages to that effect, and also added that detail to one message where
it was available but not printed.
Going through the remaining report_invalid_record() calls I then
adjusted the use of "invalid" vs. "incorrect" in one case. The message
"record with invalid length" makes it sound like the length was
something like -5, but really we know what the length should be and what
we got wasn't it, so "incorrect" sounded better and is also used in
other error messages in that file.
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Make-some-xlogreader-messages-more-accurate.patch | text/plain | 2.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2023-02-23 07:51:47 | Re: [PATCH] Add pretty-printed XML output option |
| Previous Message | Corey Huinker | 2023-02-23 07:30:08 | Re: Add SHELL_EXIT_CODE to psql |