@@ -86,7 +86,7 @@ int min_wal_size = 5; /* 80 MB */
86
86
int wal_keep_segments = 0 ;
87
87
int XLOGbuffers = -1 ;
88
88
int XLogArchiveTimeout = 0 ;
89
- bool XLogArchiveMode = false ;
89
+ int XLogArchiveMode = ARCHIVE_MODE_OFF ;
90
90
char * XLogArchiveCommand = NULL ;
91
91
bool EnableHotStandby = false;
92
92
bool fullPageWrites = true;
@@ -140,6 +140,24 @@ const struct config_enum_entry sync_method_options[] = {
140
140
{NULL , 0 , false}
141
141
};
142
142
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
+
143
161
/*
144
162
* Statistics for current checkpoint are collected in this global struct.
145
163
* Because only the checkpointer or a stand-alone backend can perform
@@ -767,7 +785,7 @@ static MemoryContext walDebugCxt = NULL;
767
785
#endif
768
786
769
787
static void readRecoveryCommandFile (void );
770
- static void exitArchiveRecovery (TimeLineID endTLI , XLogSegNo endLogSegNo );
788
+ static void exitArchiveRecovery (TimeLineID endTLI , XLogRecPtr endOfLog );
771
789
static bool recoveryStopsBefore (XLogReaderState * record );
772
790
static bool recoveryStopsAfter (XLogReaderState * record );
773
791
static void recoveryPausesHere (void );
0 commit comments