mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
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
This commit is contained in:
parent
6cfa54e384
commit
3ea56fffd6
@ -679,7 +679,7 @@ ReceiveXlogStream(PGconn *conn, StreamCtl *stream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (walfile != NULL && stream->walmethod->close(walfile, CLOSE_NORMAL) != 0)
|
if (walfile != NULL && stream->walmethod->close(walfile, CLOSE_NO_RENAME) != 0)
|
||||||
fprintf(stderr, _("%s: could not close file \"%s\": %s\n"),
|
fprintf(stderr, _("%s: could not close file \"%s\": %s\n"),
|
||||||
progname, current_walfile_name, stream->walmethod->getlasterror());
|
progname, current_walfile_name, stream->walmethod->getlasterror());
|
||||||
walfile = NULL;
|
walfile = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user