]> granicus.if.org Git - postgresql/commitdiff
Mention index name when reporting corruption.
authorBruce Momjian <bruce@momjian.us>
Wed, 1 Dec 1999 00:29:54 +0000 (00:29 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 1 Dec 1999 00:29:54 +0000 (00:29 +0000)
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtree.c
src/backend/commands/vacuum.c

index cc56126a21815acac65af3c34e4dd0ce220fcb03..c2d52f03b10f5ec58639208ce1abfb17d61c9fa5 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.33 1999/11/14 19:01:04 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.34 1999/12/01 00:29:53 momjian Exp $
  *
  *     NOTES
  *        Postgres btree pages look like ordinary relation pages.      The opaque
@@ -502,7 +502,8 @@ _bt_getstackbuf(Relation rel, BTStack stack, int access)
        {
                blkno = opaque->btpo_next;
                if (P_RIGHTMOST(opaque))
-                       elog(FATAL, "my bits moved right off the end of the world!\n\tTry recreating the index.");
+                       elog(FATAL, "my bits moved right off the end of the world!\
+\n\tRecreate index %s.", RelationGetRelationName(rel));
 
                _bt_relbuf(rel, buf, access);
                buf = _bt_getbuf(rel, blkno, access);
index e2425ce7545561eaccc631581c175c49c58ee1b7..e1260808b355e7ee3c92632863c61db1e0297a46 100644 (file)
@@ -11,7 +11,7 @@
  * Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.48 1999/11/14 16:22:59 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.49 1999/12/01 00:29:53 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -664,7 +664,8 @@ _bt_restscan(IndexScanDesc scan)
        for (;;)
        {
                if (P_RIGHTMOST(opaque))
-                       elog(FATAL, "_bt_restscan: my bits moved right off the end of the world!\nTry recreating the index.");
+                       elog(FATAL, "_bt_restscan: my bits moved right off the end of the world!\
+\n\tRecreate index %s.", RelationGetRelationName(rel));
 
                blkno = opaque->btpo_next;
                _bt_relbuf(rel, buf, BT_READ);
index 25713b5c1b0ab594a19dc4d3f6edbbf53eebea89..7e5d19ec67db5305cde302816f4d9233447a229b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.128 1999/11/29 04:43:15 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.129 1999/12/01 00:29:54 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1997,7 +1997,8 @@ vc_scanoneind(Relation indrel, int num_tuples)
                 ru1.ru_utime.tv_sec - ru0.ru_utime.tv_sec);
 
        if (nitups != num_tuples)
-               elog(NOTICE, "Index %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u).\n\tTry recreating the index.",
+               elog(NOTICE, "Index %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u).\
+\n\tRecreate the index.",
                         RelationGetRelationName(indrel), nitups, num_tuples);
 
 }      /* vc_scanoneind */
@@ -2078,7 +2079,8 @@ vc_vaconeind(VPageList vpl, Relation indrel, int num_tuples, int keep_tuples)
                 ru1.ru_utime.tv_sec - ru0.ru_utime.tv_sec);
 
        if (num_index_tuples != num_tuples + keep_tuples)
-               elog(NOTICE, "Index %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u).\n\tTry recreating the index.",
+               elog(NOTICE, "Index %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u).\
+\n\tRecreate the index.",
                         RelationGetRelationName(indrel), num_index_tuples, num_tuples);
 
 }      /* vc_vaconeind */