Commit 58bece7a authored by Heikki Linnakangas's avatar Heikki Linnakangas

Fix #ifdeffed debugging code to work with relation forks.

parent e3097396
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/buffer/localbuf.c,v 1.83 2008/11/11 14:17:02 tgl Exp $ * $PostgreSQL: pgsql/src/backend/storage/buffer/localbuf.c,v 1.84 2008/11/27 07:38:01 heikki Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -88,8 +88,8 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum, ...@@ -88,8 +88,8 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum,
bufHdr = &LocalBufferDescriptors[b]; bufHdr = &LocalBufferDescriptors[b];
Assert(BUFFERTAGS_EQUAL(bufHdr->tag, newTag)); Assert(BUFFERTAGS_EQUAL(bufHdr->tag, newTag));
#ifdef LBDEBUG #ifdef LBDEBUG
fprintf(stderr, "LB ALLOC (%u,%d) %d\n", fprintf(stderr, "LB ALLOC (%u,%d,%d) %d\n",
smgr->smgr_rnode.relNode, blockNum, -b - 1); smgr->smgr_rnode.relNode, forkNum, blockNum, -b - 1);
#endif #endif
/* this part is equivalent to PinBuffer for a shared buffer */ /* this part is equivalent to PinBuffer for a shared buffer */
if (LocalRefCount[b] == 0) if (LocalRefCount[b] == 0)
...@@ -111,8 +111,8 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum, ...@@ -111,8 +111,8 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum,
} }
#ifdef LBDEBUG #ifdef LBDEBUG
fprintf(stderr, "LB ALLOC (%u,%d) %d\n", fprintf(stderr, "LB ALLOC (%u,%d,%d) %d\n",
RelationGetRelid(reln), blockNum, -nextFreeLocalBuf - 1); smgr->smgr_rnode.relNode, forkNum, blockNum, -nextFreeLocalBuf - 1);
#endif #endif
/* /*
......
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