mirror of
https://github.com/postgres/postgres.git
synced 2026-03-01 04:40:42 -05:00
Check for error during PQendcopy.
Oversight in commit 78c8c8143; noted while nosing around the walreceiver startup/shutdown code.
This commit is contained in:
parent
fca85f8ef1
commit
609fa63db6
1 changed files with 4 additions and 1 deletions
|
|
@ -459,7 +459,10 @@ libpqrcv_endstreaming(WalReceiverConn *conn, TimeLineID *next_tli)
|
|||
PQclear(res);
|
||||
|
||||
/* End the copy */
|
||||
PQendcopy(conn->streamConn);
|
||||
if (PQendcopy(conn->streamConn))
|
||||
ereport(ERROR,
|
||||
(errmsg("error while shutting down streaming COPY: %s",
|
||||
pchomp(PQerrorMessage(conn->streamConn)))));
|
||||
|
||||
/* CommandComplete should follow */
|
||||
res = PQgetResult(conn->streamConn);
|
||||
|
|
|
|||
Loading…
Reference in a new issue