diff options
Diffstat (limited to 'src/backend/replication/walsender.c')
-rw-r--r-- | src/backend/replication/walsender.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index 9b143f361b8..4bb98ef352a 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -521,7 +521,11 @@ SendTimeLineHistory(TimeLineHistoryCmd *cmd) pq_sendbytes(&buf, rbuf.data, nread); bytesleft -= nread; } - CloseTransientFile(fd); + + if (CloseTransientFile(fd)) + ereport(ERROR, + (errcode_for_file_access(), + errmsg("could not close file \"%s\": %m", path))); pq_endmessage(&buf); } |