mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +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:
@@ -540,7 +540,10 @@ WalReceiverMain(void)
|
||||
* being archived later.
|
||||
*/
|
||||
XLogFileName(xlogfname, recvFileTLI, recvSegNo);
|
||||
XLogArchiveForceDone(xlogfname);
|
||||
if (XLogArchiveMode != ARCHIVE_MODE_ALWAYS)
|
||||
XLogArchiveForceDone(xlogfname);
|
||||
else
|
||||
XLogArchiveNotify(xlogfname);
|
||||
}
|
||||
recvFile = -1;
|
||||
|
||||
@@ -897,7 +900,10 @@ XLogWalRcvWrite(char *buf, Size nbytes, XLogRecPtr recptr)
|
||||
* from being archived later.
|
||||
*/
|
||||
XLogFileName(xlogfname, recvFileTLI, recvSegNo);
|
||||
XLogArchiveForceDone(xlogfname);
|
||||
if (XLogArchiveMode != ARCHIVE_MODE_ALWAYS)
|
||||
XLogArchiveForceDone(xlogfname);
|
||||
else
|
||||
XLogArchiveNotify(xlogfname);
|
||||
}
|
||||
recvFile = -1;
|
||||
|
||||
|
Reference in New Issue
Block a user