Network write errors (was: Re: Feature freeze date for 8.1)

From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Network write errors (was: Re: Feature freeze date for 8.1)
Date: 2005-05-01 16:39:59
Message-ID: slrnd7a1iq.2da6.andrew+nonews@trinity.supernews.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On 2005-05-01, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> The problem, as I understand it, is that if you have a long-running
> query and the client process disappears, the query keeps running and
> holds whatever resources it may have until it finishes. In fact, it
> keeps sending data to the client and keeps ignoring the SIGPIPE it gets
> (in case of a Unix-domain socket connection).

Ignoring the SIGPIPE is exactly the right thing to do.

What's _not_ a good idea is ignoring the EPIPE error from write(), which
seems to currently be reported via ereport(COMMERROR) which doesn't try
and abort the query as far as I can tell.

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message adnandursun 2005-05-01 16:57:37 Re: Feature freeze date for 8.1
Previous Message adnandursun 2005-05-01 16:34:40 Re: Feature freeze date for 8.1

Browse pgsql-patches by date

  From Date Subject
Next Message adnandursun 2005-05-01 16:57:37 Re: Feature freeze date for 8.1
Previous Message Tom Lane 2005-05-01 15:58:39 Re: Problem with Create Domain example