From: Bruce Momjian Date: Wed, 1 Dec 1999 00:29:54 +0000 (+0000) Subject: Mention index name when reporting corruption. X-Git-Tag: REL7_0~1102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4901ff77bd17ee9108824df11b679dbaf7daf6b3;p=postgresql Mention index name when reporting corruption. --- diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index cc56126a21..c2d52f03b1 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -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); diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c index e2425ce754..e1260808b3 100644 --- a/src/backend/access/nbtree/nbtree.c +++ b/src/backend/access/nbtree/nbtree.c @@ -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); diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 25713b5c1b..7e5d19ec67 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -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 */