Re: libpq and psql not on same page about SIGPIPE

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

Manfred Spraul wrote:
> >This seems workable as long as we document the possible gotchas.
> >
> >
> >
> Is that really worthwhile? There are half a dozend assumption about the
> C library and kernel internal efficiency of the signal handling
> functions in the proposal. Adding a PQinitLib function is obviously a

The main path uses pthread_sigmask() and sigpending(). Are those
possible performance problems? I see how signal() would be a thread
problem, but not those.

> larger change, but it solves the problem.
> I'm aware of one minor gotcha: PQinSend() is not usable right now: it
> relies on the initialization of pq_thread_in_send, which is only created
> in the middle of the first connectDB(). That makes proper signal
> handling for the first connection impossible.

I think that whole PQinSend thing is pretty ugly, even if I did write
it. My current patch seems like a great improvement.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-12-01 22:43:35 Re: libpq and psql not on same page about SIGPIPE
Previous Message Bruce Momjian 2004-12-01 22:39:16 Re: New compile warnings for inheritance

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-12-01 22:43:35 Re: libpq and psql not on same page about SIGPIPE
Previous Message Bruce Momjian 2004-12-01 22:37:53 Re: libpq and psql not on same page about SIGPIPE