From: | Manfred Spraul <manfred(at)colorfullife(dot)com> |
---|---|
To: | AgentM <agentm(at)webopticon(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL |
Date: | 2003-11-02 21:10:57 |
Message-ID: | 3FA572E1.8050609@colorfullife.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
AgentM wrote:
> That wouldn't offer a solution for people who use SIGPIPE for other
> things during the lifetime of the program (after creating the
> connection) and if a SIGPIPE handler is called due to the connection,
> the handler won't be expecting the source, and polling signal for
> state is essentially what you do now. Instead, I propose a
> PQsigpipeOK/PQacceptsigpipe/PQrecvsigpipe(PGconn*) or something to
> that effect which skips this check for the connection. That way,
> programmers are aware that the connection could call their SIGPIPE
> handler because they explicitly request it and the library remains
> backwards-compatible.
If I understand libpq sources correctly, the first packets are send
during connection setup - PQsigpipeOK(PGconn *) would be too late.
That's why I added "sigpipe=caller" as a new flag for PQconnectdb.
--
Manfred
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2003-11-02 21:20:50 | Re: Experimental patch for inter-page delay in VACUUM |
Previous Message | AgentM | 2003-11-02 20:32:51 | Re: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL |