Re: new compiler warnings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql(at)j-davis(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: new compiler warnings
Date: 2011-10-18 22:15:02
Message-ID: 25614.1318976102@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> On 18.10.2011 23:28, Tom Lane wrote:
>> I don't think the assert is a good idea. If it ever did happen, that
>> would promote the problem from "corrupted data in the log" to "database
>> crash".

> I believe the idea is that if there's a platform that does that, we want
> to know. In production, you don't run with assertions enabled. It makes
> sense to me, or can we fall back to logging a warning to stderr or
> something?

Unfortunately, the problem we're dealing with here is exactly that we
can't write to stderr. So it's a bit hard to see what we can usefully
do to report that we have a problem (short of crashing, which isn't a
net improvement).

In practice, the lack of field reports of corrupted postmaster logs
seems to me to be adequate evidence that the code does work as intended.
All we really need to do is shut gcc up about it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-10-18 22:38:03 Re: Silent failure with invalid hba_file setting
Previous Message Tom Lane 2011-10-18 21:52:30 Re: new compiler warnings