Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteca199d

Browse files
committed
Debug stuff added to BlowawayRelationBuffers().
1 parentbd305f3 commiteca199d

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

‎src/backend/storage/buffer/bufmgr.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.27 1997/10/12 07:12:02 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.28 1997/10/22 19:04:43 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1631,9 +1631,18 @@ BlowawayRelationBuffers(Relation rdesc, BlockNumber block)
16311631
buf->tag.blockNum >=block)
16321632
{
16331633
if (buf->flags&BM_DIRTY)
1634+
{
1635+
elog (NOTICE,"BlowawayRelationBuffers(%s (local), %u): block %u is dirty",
1636+
rdesc->rd_rel->relname.data,block,buf->tag.blockNum);
16341637
return (-1);
1638+
}
16351639
if (LocalRefCount[i]>0)
1640+
{
1641+
elog (NOTICE,"BlowawayRelationBuffers(%s (local), %u): block %u is referenced (%d)",
1642+
rdesc->rd_rel->relname.data,block,
1643+
buf->tag.blockNum,LocalRefCount[i]);
16361644
return (-2);
1645+
}
16371646
buf->tag.relId.relId=InvalidOid;
16381647
}
16391648
}
@@ -1650,11 +1659,17 @@ BlowawayRelationBuffers(Relation rdesc, BlockNumber block)
16501659
{
16511660
if (buf->flags&BM_DIRTY)
16521661
{
1662+
elog (NOTICE,"BlowawayRelationBuffers(%s, %u): block %u is dirty (private %d, last %d, global %d)",
1663+
buf->sb_relname,block,buf->tag.blockNum,
1664+
PrivateRefCount[i],LastRefCount[i],buf->refcount);
16531665
SpinRelease(BufMgrLock);
16541666
return (-1);
16551667
}
16561668
if (!(buf->flags&BM_FREE))
16571669
{
1670+
elog (NOTICE,"BlowawayRelationBuffers(%s, %u): block %u is referenced (private %d, last %d, global %d)",
1671+
buf->sb_relname,block,buf->tag.blockNum,
1672+
PrivateRefCount[i],LastRefCount[i],buf->refcount);
16581673
SpinRelease(BufMgrLock);
16591674
return (-2);
16601675
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp