MCPcopy Create free account
hub / github.com/apache/cloudberry / handleSyncLoss

Function handleSyncLoss

src/interfaces/libpq/fe-protocol3.c:633–645  ·  view source on GitHub ↗

* handleSyncLoss: clean up after loss of message-boundary sync * * There isn't really a lot we can do here except abandon the connection. */

Source from the content-addressed store, hash-verified

631 * There isn't really a lot we can do here except abandon the connection.
632 */
633static void
634handleSyncLoss(PGconn *conn, char id, int msgLength)
635{
636 appendPQExpBuffer(&conn->errorMessage,
637 libpq_gettext("lost synchronization with server: got message type \"%c\", length %d\n"),
638 id, msgLength);
639 /* build an error result holding the error message */
640 pqSaveErrorResult(conn);
641 conn->asyncStatus = PGASYNC_READY; /* drop out of PQgetResult wait loop */
642 /* flush input data since we're giving up on processing it */
643 pqDropConnection(conn, true);
644 conn->status = CONNECTION_BAD; /* No more connection to backend */
645}
646
647/*
648 * parseInput subroutine to read a 'T' (row descriptions) message.

Callers 3

pqParseInput3Function · 0.85
getCopyDataMessageFunction · 0.85
pqFunctionCall3Function · 0.85

Calls 4

appendPQExpBufferFunction · 0.85
libpq_gettextFunction · 0.85
pqSaveErrorResultFunction · 0.85
pqDropConnectionFunction · 0.85

Tested by

no test coverage detected