mirror of
https://github.com/postgres/postgres.git
synced 2025-11-28 11:44:57 +03:00
Add archive_mode='always' option.
In 'always' mode, the standby independently archives all files it receives from the primary. Original patch by Fujii Masao, docs and review by me.
This commit is contained in:
@@ -480,7 +480,10 @@ KeepFileRestoredFromArchive(char *path, char *xlogfname)
|
||||
* Create .done file forcibly to prevent the restored segment from being
|
||||
* archived again later.
|
||||
*/
|
||||
XLogArchiveForceDone(xlogfname);
|
||||
if (XLogArchiveMode != ARCHIVE_MODE_ALWAYS)
|
||||
XLogArchiveForceDone(xlogfname);
|
||||
else
|
||||
XLogArchiveNotify(xlogfname);
|
||||
|
||||
/*
|
||||
* If the existing file was replaced, since walsenders might have it open,
|
||||
|
||||
Reference in New Issue
Block a user