pg_resetxlog was missing support for the pg_control fields added in 7.3.
authorTom Lane
Wed, 2 Oct 2002 19:45:47 +0000 (19:45 +0000)
committerTom Lane
Wed, 2 Oct 2002 19:45:47 +0000 (19:45 +0000)
src/bin/pg_resetxlog/pg_resetxlog.c

index 0d230076eea2e014e1af1c8ad82c1223f2b70782..56621cd5569942833c9657455006389f358478f0 100644 (file)
@@ -23,7 +23,7 @@
  * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Header: /cvsroot/pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.5 2002/09/04 20:31:35 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.6 2002/10/02 19:45:47 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -357,6 +357,15 @@ GuessControlValues(void)
 
    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, "");
    if (!localeptr)
    {
@@ -402,6 +411,11 @@ PrintControlValues(bool guessed)
    printf(_("Latest checkpoint's NextOID:          %u\n"), ControlFile.checkPointCopy.nextOid);
    printf(_("Database block size:                  %u\n"), ControlFile.blcksz);
    printf(_("Blocks per segment of large relation: %u\n"), ControlFile.relseg_size);
+   printf(_("Maximum length of identifiers:        %u\n"), ControlFile.nameDataLen);
+   printf(_("Maximum number of function arguments: %u\n"), ControlFile.funcMaxArgs);
+   printf(_("Date/time type storage:               %s\n"),
+          (ControlFile.enableIntTimes ? _("64-bit integers") : _("Floating point")));
+   printf(_("Maximum length of locale name:        %u\n"), ControlFile.localeBuflen);
    printf(_("LC_COLLATE:                           %s\n"), ControlFile.lc_collate);
    printf(_("LC_CTYPE:                             %s\n"), ControlFile.lc_ctype);
 }