diff options
| author | Heikki Linnakangas | 2015-05-15 15:55:24 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2015-05-15 15:55:24 +0000 |
| commit | ffd37740ee6fcd434416ec0c5461f7040e0a11de (patch) | |
| tree | 8426b73d24330acbe89def851bf639024915c596 /src/backend/access/transam/xlogarchive.c | |
| parent | f6d65f0c7068bab6a9ca55a82f18fd52e8fd1e5e (diff) | |
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.
Diffstat (limited to 'src/backend/access/transam/xlogarchive.c')
| -rw-r--r-- | src/backend/access/transam/xlogarchive.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlogarchive.c b/src/backend/access/transam/xlogarchive.c index f435f65e98b..4c69b738bc1 100644 --- a/src/backend/access/transam/xlogarchive.c +++ b/src/backend/access/transam/xlogarchive.c @@ -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, |
