Re: new compiler warnings

From: Greg Stark <stark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql(at)j-davis(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: new compiler warnings
Date: 2011-10-19 15:30:57
Message-ID: CAM-w4HOacpc+eKdx=puvR-D87Bhia_1U2h=jCqNzyHV=mnpEjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 18, 2011 at 6:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> The chunks are sent indivisibly, because they are less than the pipe
> buffer size.  Read the pipe man page.  It's guaranteed that the write
> will either succeed or fail as a whole, not write a partial message.
> If we cared to retry a failure, there would be some point in checking
> the return code.

It sounds to me like we should check for a short write and if it
occurs we should generate an error to for the administrator so he
knows his kernel isn't meeting Postgres's expectations and things
might not work correctly.

How to write a log message about the logging infrastructure being
broken is a bit tricky but it seems to me this is a general problem we
need a solution for. We need some kind of fallback for problems with
the postmaster or other important messages that are either so severe
or just so specific that they prevent the normal logging mechanism
from working.

--
greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Jaskiewicz 2011-10-19 15:47:14 Re: Bug in walsender when calling out to do_pg_stop_backup (and others?)
Previous Message Simon Riggs 2011-10-19 14:58:09 Re: Separating bgwriter and checkpointer