Skip to content

Commit 6ea05c1

Browse files
committed
Change a couple of "can't happen" error messages to be a shade more
verbose when they do happen. The "left link changed unexpectedly" one in particular has been seen more than once in the field.
1 parent 3ae7e4a commit 6ea05c1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/backend/access/nbtree/nbtpage.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.86 2005/06/06 20:22:57 tgl Exp $
12+
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.87 2005/08/12 14:34:14 tgl Exp $
1313
*
1414
* NOTES
1515
* Postgres btree pages look like ordinary relation pages. The opaque
@@ -826,7 +826,8 @@ _bt_pagedel(Relation rel, Buffer buf, bool vacuum_full)
826826
_bt_relbuf(rel, lbuf);
827827
if (leftsib == P_NONE)
828828
{
829-
elog(LOG, "no left sibling (concurrent deletion?)");
829+
elog(LOG, "no left sibling (concurrent deletion?) in \"%s\"",
830+
RelationGetRelationName(rel));
830831
return 0;
831832
}
832833
lbuf = _bt_getbuf(rel, leftsib, BT_WRITE);
@@ -861,7 +862,8 @@ _bt_pagedel(Relation rel, Buffer buf, bool vacuum_full)
861862
return 0;
862863
}
863864
if (opaque->btpo_prev != leftsib)
864-
elog(ERROR, "left link changed unexpectedly");
865+
elog(ERROR, "left link changed unexpectedly in block %u of \"%s\"",
866+
target, RelationGetRelationName(rel));
865867

866868
/*
867869
* And next write-lock the (current) right sibling.
@@ -984,8 +986,8 @@ _bt_pagedel(Relation rel, Buffer buf, bool vacuum_full)
984986
itemid = PageGetItemId(page, nextoffset);
985987
btitem = (BTItem) PageGetItem(page, itemid);
986988
if (ItemPointerGetBlockNumber(&(btitem->bti_itup.t_tid)) != rightsib)
987-
elog(PANIC, "right sibling is not next child");
988-
989+
elog(PANIC, "right sibling is not next child in \"%s\"",
990+
RelationGetRelationName(rel));
989991
PageIndexTupleDelete(page, nextoffset);
990992
}
991993

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy