Re: Unhappy with error handling in psql's handleCopyOut()

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Unhappy with error handling in psql's handleCopyOut()
Дата
Msg-id 20140212030024.GY2921@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Unhappy with error handling in psql's handleCopyOut()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> I was able to reproduce this misbehavior by setting a gdb breakpoint
> at pqReadData and then killing the connected server process while psql's
> COPY IN was stopped there.  Resetting outCount to zero in the
> socket-already-gone case in pqSendSome is enough to fix the problem.
> However, I think it's also prudent to hack PQgetResult so that it
> won't return a "copy in progress" status if the connection is known
> dead.

Agreed.

> The error recovery behavior in pqSendSome has been like this since 8.1
> or thereabouts, so I'm inclined to push something like the attached into
> all branches.

Looks good to me, thanks for running this down!
Stephen

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: truncating pg_multixact/members
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: improve the help message about psql -F