You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a notion of a 'catalog version number' that can indicate
when an initdb-forcing change has been applied within a development cycle.
PG_VERSION serves this purpose for official releases, but we can't bump
the PG_VERSION number every time we make a change to the catalogs during
development. Instead, increase the catalog version number to warn other
developers that you've made an incompatible change. See my mail to
pghackers for more info.
elog(STOP, "BootStrapXLOG failed to write control file: %d", errno);
@@ -1179,9 +1196,6 @@ BootStrapXLOG()
1179
1196
elog(STOP, "BootStrapXLOG failed to fsync control file: %d", errno);
1180
1197
1181
1198
close(fd);
1182
-
1183
-
return;
1184
-
1185
1199
}
1186
1200
1187
1201
staticchar*
@@ -1258,11 +1272,16 @@ StartupXLOG()
1258
1272
!XRecOffIsValid(ControlFile->checkPoint.xrecoff))
1259
1273
elog(STOP, "Control file context is broken");
1260
1274
1275
+
/* Check for incompatible database */
1261
1276
if (ControlFile->blcksz!=BLCKSZ)
1262
-
elog(STOP, "database was initialized in BLCKSZ(%d), but the backend was compiled in BLCKSZ(%d)",ControlFile->blcksz,BLCKSZ);
1263
-
1277
+
elog(STOP, "database was initialized with BLCKSZ %d,\n\tbut the backend was compiled with BLCKSZ %d.\n\tlooks like you need to initdb.",
1278
+
ControlFile->blcksz, BLCKSZ);
1264
1279
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);
1280
+
elog(STOP, "database was initialized with RELSEG_SIZE %d,\n\tbut the backend was compiled with RELSEG_SIZE %d.\n\tlooks like you need to initdb.",
1281
+
ControlFile->relseg_size, RELSEG_SIZE);
1282
+
if (ControlFile->catalog_version_no!=CATALOG_VERSION_NO)
1283
+
elog(STOP, "database was initialized with CATALOG_VERSION_NO %d,\n\tbut the backend was compiled with CATALOG_VERSION_NO %d.\n\tlooks like you need to initdb.",
0 commit comments