aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2015-05-15 18:55:24 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2015-05-15 18:55:24 +0300
commitffd37740ee6fcd434416ec0c5461f7040e0a11de (patch)
tree8426b73d24330acbe89def851bf639024915c596 /src/backend/utils
parentf6d65f0c7068bab6a9ca55a82f18fd52e8fd1e5e (diff)
downloadpostgresql-ffd37740ee6fcd434416ec0c5461f7040e0a11de.tar.gz
postgresql-ffd37740ee6fcd434416ec0c5461f7040e0a11de.zip
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/utils')
-rw-r--r--src/backend/utils/misc/guc.c21
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample2
2 files changed, 12 insertions, 11 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 222228ae5a7..3038d7c9dda 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -396,6 +396,7 @@ static const struct config_enum_entry row_security_options[] = {
* Options for enum values stored in other modules
*/
extern const struct config_enum_entry wal_level_options[];
+extern const struct config_enum_entry archive_mode_options[];
extern const struct config_enum_entry sync_method_options[];
extern const struct config_enum_entry dynamic_shared_memory_options[];
@@ -1530,16 +1531,6 @@ static struct config_bool ConfigureNamesBool[] =
},
{
- {"archive_mode", PGC_POSTMASTER, WAL_ARCHIVING,
- gettext_noop("Allows archiving of WAL files using archive_command."),
- NULL
- },
- &XLogArchiveMode,
- false,
- NULL, NULL, NULL
- },
-
- {
{"hot_standby", PGC_POSTMASTER, REPLICATION_STANDBY,
gettext_noop("Allows connections and queries during recovery."),
NULL
@@ -3552,6 +3543,16 @@ static struct config_enum ConfigureNamesEnum[] =
},
{
+ {"archive_mode", PGC_POSTMASTER, WAL_ARCHIVING,
+ gettext_noop("Allows archiving of WAL files using archive_command."),
+ NULL
+ },
+ &XLogArchiveMode,
+ ARCHIVE_MODE_OFF, archive_mode_options,
+ NULL, NULL, NULL
+ },
+
+ {
{"trace_recovery_messages", PGC_SIGHUP, DEVELOPER_OPTIONS,
gettext_noop("Enables logging of recovery-related debugging information."),
gettext_noop("Each level includes all the levels that follow it. The later"
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 110983f1764..06dfc067b03 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -206,7 +206,7 @@
# - Archiving -
-#archive_mode = off # allows archiving to be done
+#archive_mode = off # enables archiving; off, on, or always
# (change requires restart)
#archive_command = '' # command to use to archive a logfile segment
# placeholders: %p = path of file to archive