@@ -86,7 +86,7 @@ int min_wal_size = 5; /* 80 MB */
8686int wal_keep_segments = 0 ;
8787int XLOGbuffers = -1 ;
8888int XLogArchiveTimeout = 0 ;
89- bool XLogArchiveMode = false ;
89+ int XLogArchiveMode = ARCHIVE_MODE_OFF ;
9090char * XLogArchiveCommand = NULL ;
9191bool EnableHotStandby = false;
9292bool fullPageWrites = true;
@@ -140,6 +140,24 @@ const struct config_enum_entry sync_method_options[] = {
140140 {NULL , 0 , false}
141141};
142142
143+
144+ /*
145+ * Although only "on", "off", and "always" are documented,
146+ * we accept all the likely variants of "on" and "off".
147+ */
148+ const struct config_enum_entry archive_mode_options [] = {
149+ {"always" , ARCHIVE_MODE_ALWAYS , false},
150+ {"on" , ARCHIVE_MODE_ON , false},
151+ {"off" , ARCHIVE_MODE_OFF , false},
152+ {"true" , ARCHIVE_MODE_ON , true},
153+ {"false" , ARCHIVE_MODE_OFF , true},
154+ {"yes" , ARCHIVE_MODE_ON , true},
155+ {"no" , ARCHIVE_MODE_OFF , true},
156+ {"1" , ARCHIVE_MODE_ON , true},
157+ {"0" , ARCHIVE_MODE_OFF , true},
158+ {NULL , 0 , false}
159+ };
160+
143161/*
144162 * Statistics for current checkpoint are collected in this global struct.
145163 * Because only the checkpointer or a stand-alone backend can perform
@@ -767,7 +785,7 @@ static MemoryContext walDebugCxt = NULL;
767785#endif
768786
769787static void readRecoveryCommandFile (void );
770- static void exitArchiveRecovery (TimeLineID endTLI , XLogSegNo endLogSegNo );
788+ static void exitArchiveRecovery (TimeLineID endTLI , XLogRecPtr endOfLog );
771789static bool recoveryStopsBefore (XLogReaderState * record );
772790static bool recoveryStopsAfter (XLogReaderState * record );
773791static void recoveryPausesHere (void );
0 commit comments