Skip site navigation (1) Skip section navigation (2)

Re: simplifying emode_for_corrupt_record

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: simplifying emode_for_corrupt_record
Date: 2010-06-28 19:42:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Fri, Jun 25, 2010 at 5:07 PM, Robert Haas <robertmhaas(at)gmail(dot)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
The Enterprise Postgres Company

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-06-28 19:44:41
Subject: Re: Propose Beta3 for July
Previous:From: Robert HaasDate: 2010-06-28 19:41:02
Subject: Re: Propose Beta3 for July

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group