Re: OSDL DBT-2 w/ PostgreSQL 7.3.4 and 7.4beta5

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: OSDL DBT-2 w/ PostgreSQL 7.3.4 and 7.4beta5
Дата
Msg-id 24188.1067974432@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: OSDL DBT-2 w/ PostgreSQL 7.3.4 and 7.4beta5  (Manfred Spraul <manfred@colorfullife.com>)
Ответы Re: OSDL DBT-2 w/ PostgreSQL 7.3.4 and 7.4beta5
Список pgsql-hackers
Manfred Spraul <manfred@colorfullife.com> writes:
> For multithreaded apps, this is not possible: sigaction is per process.
> Thus the calling application must handle the SIGPIPE signals for libpq - 
> either by blocking or ignoring them. We are still discussing the exact 
> API. Probably a global state that is accessible through a new function.

I think we should also take a hard look at avoiding the problem by using
MSG_NOSIGNAL on platforms that have it, so that the right things happen
and overhead is minimized whether or not the application knows to do
this.  Besides I am not convinced that an app that *wants* SIGPIPE on
some of its output channels could reasonably solve the problem with a
custom signal handler --- how will the handler know which FD the signal
came from?

The difficulty with MSG_NOSIGNAL is in getting libssl to cooperate.
I wonder if we could convince the libssl implementors that MSG_NOSIGNAL
should be used when available in their standard release, or at least
they should provide an option to use it?  The alternative would be to
create our own BIO for libssl, which I think is doable, but would likely
be a pain in the neck to maintain.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Manfred Spraul
Дата:
Сообщение: Re: OSDL DBT-2 w/ PostgreSQL 7.3.4 and 7.4beta5
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Open Sourcing pgManage