Re: simplifying emode_for_corrupt_record - Mailing list pgsql-hackers

From Robert Haas
Subject Re: simplifying emode_for_corrupt_record
Date
Msg-id AANLkTikpfpNLirdyxjDAlc-nXwFN_khIVjfHIsJIdLER@mail.gmail.com
Whole thread Raw
In response to simplifying emode_for_corrupt_record  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, Jun 25, 2010 at 5:07 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> I spend a little bit of time analyzing this today and it appears to me
> that all of the calls to emode_for_corrupt_record() arrive via
> ReadRecord(), which itself takes an emode argument that is always
> passed by the caller as either LOG or PANIC.  Therefore, the effect of
> the first "if" test in emode_for_corrupt_record() is to reduce the
> logging level of messages coming from SR or the archive from LOG to
> WARNING.  (WARNING would be higher in an interactive session, but not
> here, per Tom's point.)  This seems clearly a bad idea, so I propose
> to rip it out, which simplifies this function considerably.  Proposed
> patch attached.

Since this appears to be non-controversial, I'm going to go ahead and commit it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Propose Beta3 for July
Next
From: Tom Lane
Date:
Subject: Re: Propose Beta3 for July