From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Attempt to fix error recovery in COPY BOTH mode. |
Date: | 2013-04-29 10:43:15 |
Message-ID: | E1UWlYB-00051z-US@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Attempt to fix error recovery in COPY BOTH mode.
Previously, libpq and the backend had opposite ideas about whether
it was necessary for the client to send a CopyDone message after
receiving an ErrorResponse, making it impossible to cleanly exit
COPY BOTH mode. Fix libpq so that works correctly, adopting the
backend's notion that an ErrorResponse kills the copy in both
directions.
Adjust receivelog.c to avoid a degradation in the quality of the
resulting error messages. libpqwalreceiver.c is already doing
the right thing, so no adjustment needed there.
Add an explicit statement to the documentation explaining how
this part of the protocol is supposed to work, in the hopes of
avoiding future confusion in this area.
Since the consequences of all this confusion are very limited,
especially in the back-branches where no client ever attempts
to exit COPY BOTH mode without closing the connection entirely,
no back-patch.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/91fa8532f4053468acc08534a6aac516ccde47b7
Modified Files
--------------
doc/src/sgml/protocol.sgml | 9 +++++-
src/bin/pg_basebackup/receivelog.c | 47 ++++++++++++++++++++--------------
src/interfaces/libpq/fe-protocol3.c | 31 ++++++++++++-----------
3 files changed, 51 insertions(+), 36 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2013-04-29 18:08:54 | pgsql: Ensure ANALYZE phase is not skipped because of canceled truncate |
Previous Message | Erikjan Rijkers | 2013-04-29 10:05:26 | Re: pgsql: Introduce new page checksum algorithm and module. |