From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Make some xlogreader messages more accurate |
Date: | 2023-03-02 11:52:40 |
Message-ID: | CALj2ACU=r9qT_+4YREHOhdOXM4AxohjgjHfAqrfJMwrF1Ya9zQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Mar 2, 2023 at 1:51 PM Peter Eisentraut
<peter(dot)eisentraut(at)enterprisedb(dot)com> wrote:
>
> On 28.02.23 07:15, Bharath Rupireddy wrote:
> >> 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.
> > I have no strong opinion about this change. We seem to be using
> > "invalid length" and "incorrect length" interchangeably [1] without
> > distinguishing between "invalid" if length is < 0 and "incorrect" if
> > length >= 0 and not something we're expecting.
>
> Right, this isn't handled very consistently. I did a pass across all
> "{invalid|incorrect|wrong} {length|size}" messages and tried to make
> them more precise by adding more detail and using the appropriate word.
> What do you think about the attached patch?
Thanks. IMO, when any of the incorrect/invalid/wrong errors occur, the
wording may not matter much more than the error itself and why it
occurred. While the uniformity of this kind helps, I think it's hard
to enforce the same/similar wording in future. I prefer leaving the
code as-is. Therefore, -1 for these changes.
--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Jehan-Guillaume de Rorthais | 2023-03-02 12:08:38 | Re: Memory leak from ExecutorState context? |
Previous Message | Bharath Rupireddy | 2023-03-02 11:43:32 | Re: Improve WALRead() to suck data directly from WAL buffers when possible |