ControlFile->catalog_version_no = CATALOG_VERSION_NO;
ControlFile->blcksz = BLCKSZ;
ControlFile->relseg_size = RELSEG_SIZE;
+
+ ControlFile->nameDataLen = NAMEDATALEN;
+ ControlFile->funcMaxArgs = FUNC_MAX_ARGS;
+
+#ifdef HAVE_INT64_TIMESTAMP
+ ControlFile->enableIntTimes = TRUE;
+#else
+ ControlFile->enableIntTimes = FALSE;
+#endif
+
+ ControlFile->localeBuflen = LOCALE_NAME_BUFLEN;
localeptr = setlocale(LC_COLLATE, NULL);
if (!localeptr)
elog(PANIC, "invalid LC_COLLATE setting");
elog(WARNING, "Initializing database with %s collation order."
"\n\tThis locale setting will prevent use of index optimization for"
"\n\tLIKE and regexp searches. If you are concerned about speed of"
- "\n\tsuch queries, you may wish to set LC_COLLATE to \"C\" and"
+ "\n\tsuch queries, you may wish to set LC_COLLATE to \"C\" and"
"\n\tre-initdb. For more information see the Administrator's Guide.",
ControlFile->lc_collate);
if (ControlFile->catalog_version_no != CATALOG_VERSION_NO)
elog(PANIC,
"The database cluster was initialized with CATALOG_VERSION_NO %d,\n"
- "\tbut the backend was compiled with CATALOG_VERSION_NO %d.\n"
+ "\tbut the backend was compiled with CATALOG_VERSION_NO %d.\n"
"\tIt looks like you need to initdb.",
ControlFile->catalog_version_no, CATALOG_VERSION_NO);
if (ControlFile->blcksz != BLCKSZ)
elog(PANIC,
"The database cluster was initialized with RELSEG_SIZE %d,\n"
"\tbut the backend was compiled with RELSEG_SIZE %d.\n"
- "\tIt looks like you need to initdb.",
+ "\tIt looks like you need to recompile or initdb.",
ControlFile->relseg_size, RELSEG_SIZE);
+
+ if (ControlFile->nameDataLen != NAMEDATALEN)
+ elog(PANIC,
+ "The database cluster was initialized with NAMEDATALEN %d,\n"
+ "\tbut the backend was compiled with NAMEDATALEN %d.\n"
+ "\tIt looks like you need to recompile or initdb.",
+ ControlFile->nameDataLen, NAMEDATALEN);
+
+ if (ControlFile->funcMaxArgs != FUNC_MAX_ARGS)
+ elog(PANIC,
+ "The database cluster was initialized with FUNC_MAX_ARGS %d,\n"
+ "\tbut the backend was compiled with FUNC_MAX_ARGS %d.\n"
+ "\tIt looks like you need to recompile or initdb.",
+ ControlFile->funcMaxArgs, FUNC_MAX_ARGS);
+
+#ifdef HAVE_INT64_TIMESTAMP
+ if (ControlFile->enableIntTimes != TRUE)
+ elog(PANIC,
+ "The database cluster was initialized without HAVE_INT64_TIMESTAMP\n"
+ "\tbut the backend was compiled with HAVE_INT64_TIMESTAMP.\n"
+ "\tIt looks like you need to recompile or initdb.");
+#else
+ if (ControlFile->enableIntTimes != FALSE)
+ elog(PANIC,
+ "The database cluster was initialized with HAVE_INT64_TIMESTAMP\n"
+ "\tbut the backend was compiled without HAVE_INT64_TIMESTAMP.\n"
+ "\tIt looks like you need to recompile or initdb.");
+#endif
+
+ if (ControlFile->localeBuflen != LOCALE_NAME_BUFLEN)
+ elog(PANIC,
+ "The database cluster was initialized with LOCALE_NAME_BUFLEN %d,\n"
+ "\tbut the backend was compiled with LOCALE_NAME_BUFLEN %d.\n"
+ "\tIt looks like you need to initdb.",
+ ControlFile->localeBuflen, LOCALE_NAME_BUFLEN);
+
if (setlocale(LC_COLLATE, ControlFile->lc_collate) == NULL)
elog(PANIC,
- "The database cluster was initialized with LC_COLLATE '%s',\n"
+ "The database cluster was initialized with LC_COLLATE '%s',\n"
"\twhich is not recognized by setlocale().\n"
"\tIt looks like you need to initdb.",
ControlFile->lc_collate);