Make some xlogreader messages more accurate - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Make some xlogreader messages more accurate
Date
Msg-id 726d782b-5e45-0c3e-d775-6686afe9aa83@enterprisedb.com
Whole thread Raw
Responses Re: Make some xlogreader messages more accurate
List 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

pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Add SHELL_EXIT_CODE to psql
Next
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] Add pretty-printed XML output option