Re: new compiler warnings

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 20:34:22
Message-ID: 4E9DE2CE.4000007@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18.10.2011 23:28, Tom Lane wrote:
> "Kevin Grittner"<Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
>> Would it be too weird to do something like this for each?:
>
>> - write(fileno(stderr), line, len);
>> + rc = write(fileno(stderr), line, len);
>> + if (rc>= 0&& rc != len)
>> + {
>> + Assert(false);
>> + return;
>> + }
>
> 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?

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-10-18 21:18:18 Re: termination of backend waiting for sync rep generates a junk log message
Previous Message Kevin Grittner 2011-10-18 20:34:18 Re: new compiler warnings