Re: libpq drops error messages received just before backend crash

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: libpq drops error messages received just before backend crash
Дата
Msg-id 10249.936064409@sss.pgh.pa.us
обсуждение исходный текст
Ответ на libpq drops error messages received just before backend crash  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> It turns out that this is a libpq deficiency: it's got the error
> message, but because PQexec() was used, it's waiting around for
> a 'Z' ReadyForQuery message before it hands the error message
> back to the application.  Since the backend crashes, of course
> the 'Z' never comes ... and when libpq detects closure of the
> connection, it wipes out the stored error message in its haste
> to report
>     pqReadData() -- backend closed the channel unexpectedly.
>             This probably means the backend terminated abnormally
>             before or while processing the request.
> which is all that the user gets to see, unless he thinks to 
> look in the postmaster log.  Boo hiss.

Although I forgot to mention it in the commit log entry, this problem
is fixed in the libpq changes I just committed to the current branch.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] File descriptor leakage?
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] Postgres' lexer