Re: is ErrorResponse possible on Sync? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: is ErrorResponse possible on Sync?
Date
Msg-id 3011898.1642010704@sss.pgh.pa.us
Whole thread Raw
In response to is ErrorResponse possible on Sync?  (Andrei Matei <andreimatei1@gmail.com>)
Responses Re: is ErrorResponse possible on Sync?
List pgsql-hackers
Andrei Matei <andreimatei1@gmail.com> writes:
> I've got a question about the wire protocol; the relevant text in the docs
> seems a bit ambiguous to me. If the processing of a Sync message fails
> (e.g. because the commit of the current transaction fails), is the backend
> allowed to respond with an ErrorResponse, in addition to the ReadyForQuery
> message? Or, does the backend swallow the error, and return only the
> ReadyForQuery (I hope not).

Uh ... I don't think Sync itself can fail.  Any ErrorResponse you see
there is really from failure of some prior command.  The Sync is really
delimiting how much stuff you'd like to skip in case of a failure.
Basically this is to allow pipelining of commands, with the ability to
discard later commands if an earlier one fails.

But in any case, no, Sync would not suppress an error message if
one is needed.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: is ErrorResponse possible on Sync?
Next
From: Andrei Matei
Date:
Subject: Re: is ErrorResponse possible on Sync?