@@ -97,7 +97,13 @@ typedef struct ControlFileData
97
97
XLogRecPtr checkPoint ;/* last check point record ptr */
98
98
time_t time ;/* time stamp of last modification */
99
99
DBState state ;/* */
100
+
101
+ /*
102
+ * following data used to make sure that configurations for this DB
103
+ * do not conflict with the backend
104
+ */
100
105
uint32 blcksz ;/* block size for this DB */
106
+ uint32 relseg_size ;/* segmented file's block number */
101
107
/* MORE DATA FOLLOWS AT THE END OF THIS STRUCTURE
102
108
* - locations of data dirs
103
109
*/
@@ -1164,6 +1170,7 @@ BootStrapXLOG()
1164
1170
ControlFile -> time = time (NULL );
1165
1171
ControlFile -> state = DB_SHUTDOWNED ;
1166
1172
ControlFile -> blcksz = BLCKSZ ;
1173
+ ControlFile -> relseg_size = RELSEG_SIZE ;
1167
1174
1168
1175
if (write (fd ,buffer ,BLCKSZ )!= BLCKSZ )
1169
1176
elog (STOP ,"BootStrapXLOG failed to write control file: %d" ,errno );
@@ -1254,6 +1261,9 @@ StartupXLOG()
1254
1261
if (ControlFile -> blcksz != BLCKSZ )
1255
1262
elog (STOP ,"database was initialized in BLCKSZ(%d), but the backend was compiled in BLCKSZ(%d)" ,ControlFile -> blcksz ,BLCKSZ );
1256
1263
1264
+ if (ControlFile -> relseg_size != RELSEG_SIZE )
1265
+ elog (STOP ,"database was initialized in RELSEG_SIZE(%d), but the backend was compiled in RELSEG_SIZE(%d)" ,ControlFile -> relseg_size ,RELSEG_SIZE );
1266
+
1257
1267
if (ControlFile -> state == DB_SHUTDOWNED )
1258
1268
elog (LOG ,"Data Base System was shutdowned at %s" ,
1259
1269
str_time (ControlFile -> time ));