Tom Lane wrote:
>I don't think we need to complicate pqsignal's API for this. Instead
>we'd better document that SIGPIPE handling has to be set up and kept
>stable before doing any libpq operations in a multithread app.
>
>
Not reliable.
An app could install it's own signal handler and block SIGPIPE around
all libpq calls. Signal blocking is per-thread. But the SIG_IGN/restore
sequence affects the whole app - PQconnectdb calls would result in
randomly dropped SIGPIPE signals.
--
Manfred