@@ -97,7 +97,13 @@ typedef struct ControlFileData
9797XLogRecPtr checkPoint ;/* last check point record ptr */
9898time_t time ;/* time stamp of last modification */
9999DBState state ;/* */
100+
101+ /*
102+ * following data used to make sure that configurations for this DB
103+ * do not conflict with the backend
104+ */
100105uint32 blcksz ;/* block size for this DB */
106+ uint32 relseg_size ;/* segmented file's block number */
101107/* MORE DATA FOLLOWS AT THE END OF THIS STRUCTURE
102108 * - locations of data dirs
103109 */
@@ -1164,6 +1170,7 @@ BootStrapXLOG()
11641170ControlFile -> time = time (NULL );
11651171ControlFile -> state = DB_SHUTDOWNED ;
11661172ControlFile -> blcksz = BLCKSZ ;
1173+ ControlFile -> relseg_size = RELSEG_SIZE ;
11671174
11681175if (write (fd ,buffer ,BLCKSZ )!= BLCKSZ )
11691176elog (STOP ,"BootStrapXLOG failed to write control file: %d" ,errno );
@@ -1254,6 +1261,9 @@ StartupXLOG()
12541261if (ControlFile -> blcksz != BLCKSZ )
12551262elog (STOP ,"database was initialized in BLCKSZ(%d), but the backend was compiled in BLCKSZ(%d)" ,ControlFile -> blcksz ,BLCKSZ );
12561263
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+
12571267if (ControlFile -> state == DB_SHUTDOWNED )
12581268elog (LOG ,"Data Base System was shutdowned at %s" ,
12591269str_time (ControlFile -> time ));