Skip to content

Commit 609fa63

Browse files
committed
Check for error during PQendcopy.
Oversight in commit 78c8c81; noted while nosing around the walreceiver startup/shutdown code.
1 parent fca85f8 commit 609fa63

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,10 @@ libpqrcv_endstreaming(WalReceiverConn *conn, TimeLineID *next_tli)
459459
PQclear(res);
460460

461461
/* End the copy */
462-
PQendcopy(conn->streamConn);
462+
if (PQendcopy(conn->streamConn))
463+
ereport(ERROR,
464+
(errmsg("error while shutting down streaming COPY: %s",
465+
pchomp(PQerrorMessage(conn->streamConn)))));
463466

464467
/* CommandComplete should follow */
465468
res = PQgetResult(conn->streamConn);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy