Skip to content

Commit 3ea56ff

Browse files
committed
Don't rename .partial files in pg_receivexlog if an error occured
In 56c7d8d the behavior to keep .partial segments around (considered corrupt) in case an connection failure occurs was accidentally removed. This would lead to an incomplete segment being considered complete. Author: Michael Paquier
1 parent 6cfa54e commit 3ea56ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/pg_basebackup/receivelog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ ReceiveXlogStream(PGconn *conn, StreamCtl *stream)
679679
}
680680

681681
error:
682-
if (walfile != NULL && stream->walmethod->close(walfile, CLOSE_NORMAL) != 0)
682+
if (walfile != NULL && stream->walmethod->close(walfile, CLOSE_NO_RENAME) != 0)
683683
fprintf(stderr, _("%s: could not close file \"%s\": %s\n"),
684684
progname, current_walfile_name, stream->walmethod->getlasterror());
685685
walfile = NULL;

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