Skip to content

Commit 3055eef

Browse files
committed
More informative NOTICEs in tuple checks.
1 parent 0aba92a commit 3055eef

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/backend/commands/vacuum.c

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.30 1997/04/23 06:25:43 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.31 1997/04/30 03:05:43 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -733,8 +733,8 @@ vc_scanheap (VRelStats *vacrelstats, Relation onerel,
733733
tupgone = true;
734734
}
735735
else {
736-
elog (MESSAGE_LEVEL, "Rel %.*s: InsertTransactionInProgress %u for TID %u/%u",
737-
NAMEDATALEN, relname, htup->t_xmin, blkno, offnum);
736+
elog (MESSAGE_LEVEL, "Rel %.*s: TID %u/%u: InsertTransactionInProgress %u",
737+
NAMEDATALEN, relname, blkno, offnum, htup->t_xmin);
738738
}
739739
}
740740

@@ -765,8 +765,9 @@ vc_scanheap (VRelStats *vacrelstats, Relation onerel,
765765
*/
766766
if ( !TransactionIdIsValid((TransactionId)htup->t_xmin) )
767767
{
768-
elog (NOTICE, "TID %u/%u: INSERT_TRANSACTION_ID IS INVALID. \
768+
elog (NOTICE, "Rel %.*s: TID %u/%u: INSERT_TRANSACTION_ID IS INVALID. \
769769
DELETE_TRANSACTION_ID_VALID %d, TUPGONE %d.",
770+
NAMEDATALEN, relname, blkno, offnum,
770771
TransactionIdIsValid((TransactionId)htup->t_xmax),
771772
tupgone);
772773
}
@@ -779,23 +780,25 @@ DELETE_TRANSACTION_ID_VALID %d, TUPGONE %d.",
779780
if ( !ItemPointerIsValid (itemptr) ||
780781
BlockIdGetBlockNumber(&(itemptr->ip_blkid)) != blkno )
781782
{
782-
elog (NOTICE, "ITEM POINTER IS INVALID: %u/%u FOR %u/%u. TUPGONE %d.",
783+
elog (NOTICE, "Rel %.*s: TID %u/%u: TID IN TUPLEHEADER %u/%u IS NOT THE SAME. TUPGONE %d.",
784+
NAMEDATALEN, relname, blkno, offnum,
783785
BlockIdGetBlockNumber(&(itemptr->ip_blkid)),
784-
itemptr->ip_posid, blkno, offnum, tupgone);
786+
itemptr->ip_posid, tupgone);
785787
}
786788

787789
/*
788790
* Other checks...
789791
*/
790792
if ( htup->t_len != itemid->lp_len )
791793
{
792-
elog (NOTICE, "PAGEHEADER' LEN %u IS NOT THE SAME AS HTUP' %u FOR %u/%u.TUPGONE %d.",
793-
itemid->lp_len, htup->t_len, blkno, offnum, tupgone);
794+
elog (NOTICE, "Rel %.*s: TID %u/%u: TUPLE_LEN IN PAGEHEADER %u IS NOT THE SAME AS IN TUPLEHEADER %u. TUPGONE %d.",
795+
NAMEDATALEN, relname, blkno, offnum,
796+
itemid->lp_len, htup->t_len, tupgone);
794797
}
795798
if ( !OidIsValid(htup->t_oid) )
796799
{
797-
elog (NOTICE, "OID IS INVALID FOR %u/%u.TUPGONE %d.",
798-
blkno, offnum, tupgone);
800+
elog (NOTICE, "Rel %.*s: TID %u/%u: OID IS INVALID. TUPGONE %d.",
801+
NAMEDATALEN, relname, blkno, offnum, tupgone);
799802
}
800803

801804
if (tupgone) {

0 commit comments

Comments
 (0)