Re: libpq and psql not on same page about SIGPIPE

From: Manfred Spraul <manfred(at)colorfullife(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: libpq and psql not on same page about SIGPIPE
Date: 2004-12-02 06:28:56
Message-ID: 41AEB628.1030301@colorfullife.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:

>Not really: it only solves the problem *if you change the application*,
>which is IMHO not acceptable. In particular, why should a non-threaded
>app expect to have to change to deal with this issue? But we can't
>safely build a thread-safe libpq.so for general use if it breaks
>non-threaded apps that haven't been changed.
>
>
>
No. non-threaded apps do not need to change. The default is the old, 7.3
code: change the signal handler around the write calls. Which means that
non-threaded apps are guaranteed to work without any changes, regardless
of the libpq thread safety setting.
Threaded apps would have to change, but how many threaded apps use
libpq? They check their code anyway - either just add PQinitLib() or
review (and potentialy update) their signal handling code if it match
any of the gotchas of the transparent handling.

--
Manfred

--
Manfred

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2004-12-02 06:59:07 Re: [HACKERS] Adding Reply-To: <listname> to Lists configuration ...
Previous Message Neil Conway 2004-12-02 05:33:20 Re: nodeAgg perf tweak

Browse pgsql-patches by date

  From Date Subject
Next Message Greg Stark 2004-12-02 07:21:24 Re: [PATCHES] plperl Safe restrictions
Previous Message Neil Conway 2004-12-02 04:12:13 Re: Update for documentation on CVS