Commit 4901ff77 authored by Bruce Momjian's avatar Bruce Momjian

Mention index name when reporting corruption.

parent 1f649269
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* Postgres btree pages look like ordinary relation pages. The opaque * Postgres btree pages look like ordinary relation pages. The opaque
...@@ -502,7 +502,8 @@ _bt_getstackbuf(Relation rel, BTStack stack, int access) ...@@ -502,7 +502,8 @@ _bt_getstackbuf(Relation rel, BTStack stack, int access)
{ {
blkno = opaque->btpo_next; blkno = opaque->btpo_next;
if (P_RIGHTMOST(opaque)) 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); _bt_relbuf(rel, buf, access);
buf = _bt_getbuf(rel, blkno, access); buf = _bt_getbuf(rel, blkno, access);
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * 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) ...@@ -664,7 +664,8 @@ _bt_restscan(IndexScanDesc scan)
for (;;) for (;;)
{ {
if (P_RIGHTMOST(opaque)) 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; blkno = opaque->btpo_next;
_bt_relbuf(rel, buf, BT_READ); _bt_relbuf(rel, buf, BT_READ);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -1997,7 +1997,8 @@ vc_scanoneind(Relation indrel, int num_tuples)
ru1.ru_utime.tv_sec - ru0.ru_utime.tv_sec); ru1.ru_utime.tv_sec - ru0.ru_utime.tv_sec);
if (nitups != num_tuples) 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); RelationGetRelationName(indrel), nitups, num_tuples);
} /* vc_scanoneind */ } /* vc_scanoneind */
...@@ -2078,7 +2079,8 @@ vc_vaconeind(VPageList vpl, Relation indrel, int num_tuples, int keep_tuples) ...@@ -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); ru1.ru_utime.tv_sec - ru0.ru_utime.tv_sec);
if (num_index_tuples != num_tuples + keep_tuples) 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); RelationGetRelationName(indrel), num_index_tuples, num_tuples);
} /* vc_vaconeind */ } /* vc_vaconeind */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment