From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Noah Misch <noah(at)leadboat(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Unhappy with error handling in psql's handleCopyOut() |
Date: | 2014-02-12 03:00:24 |
Message-ID: | 20140212030024.GY2921@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2014-02-12 03:02:20 | Re: improve the help message about psql -F |
Previous Message | Robert Haas | 2014-02-12 02:25:29 | Re: truncating pg_multixact/members |