On Thu, Jun 10, 2021 at 9:26 PM Jeff Davis <pg...@j-davis.com> wrote: > The docs currently say (introduced in commit 91fa853): > > "In the event of a backend-detected error during copy-both mode, the > backend will issue an ErrorResponse message, discard frontend messages > until a Sync message is received, and then issue ReadyForQuery and > return to normal processing." > > But that doesn't seem to be correct: Sync is only used for the extended > query protocol, and CopyBoth can only be initiated with the simple > query protocol.
My impression was that CopyBoth can be initiated either way, but if you use the extended query protocol, then the result is a hopeless mess, because the protocol is badly designed: https://www.postgresql.org/message-id/ca+tgmoa4ea+cpxaigqmebp9xisvd3ze9dbvnbzevx9ucmiw...@mail.gmail.com But I think you're correct in saying that the discard-until-Sync behavior only happens if the extended query protocol is used, so I agree that the current text is wrong. -- Robert Haas EDB: http://www.enterprisedb.com