}
}
-/* -----------------------------------------------------------------
- * PrintBufferDescs
- *
- * this function prints all the buffer descriptors, for debugging
- * use only.
- * -----------------------------------------------------------------
- */
-#ifdef NOT_USED
-void
-PrintBufferDescs(void)
-{
- int i;
-
- for (i = 0; i < NBuffers; ++i)
- {
- BufferDesc *buf = GetBufferDescriptor(i);
- Buffer b = BufferDescriptorGetBuffer(buf);
-
- /* theoretically we should lock the bufhdr here */
- elog(LOG,
- "[%02d] (freeNext=%d, rel=%s, "
- "blockNum=%u, flags=0x%x, refcount=%u %d)",
- i, buf->freeNext,
- relpathbackend(BufTagGetRelFileLocator(&buf->tag),
- INVALID_PROC_NUMBER, BufTagGetForkNum(&buf->tag)),
- buf->tag.blockNum, buf->flags,
- buf->refcount, GetPrivateRefCount(b));
- }
-}
-#endif
-
-#ifdef NOT_USED
-void
-PrintPinnedBufs(void)
-{
- int i;
-
- for (i = 0; i < NBuffers; ++i)
- {
- BufferDesc *buf = GetBufferDescriptor(i);
- Buffer b = BufferDescriptorGetBuffer(buf);
-
- if (GetPrivateRefCount(b) > 0)
- {
- /* theoretically we should lock the bufhdr here */
- elog(LOG,
- "[%02d] (freeNext=%d, rel=%s, "
- "blockNum=%u, flags=0x%x, refcount=%u %d)",
- i, buf->freeNext,
- relpathperm(BufTagGetRelFileLocator(&buf->tag),
- BufTagGetForkNum(&buf->tag)),
- buf->tag.blockNum, buf->flags,
- buf->refcount, GetPrivateRefCount(b));
- }
- }
-}
-#endif
-
/* ---------------------------------------------------------------------
* FlushRelationBuffers
*
extern bool BufferIsPermanent(Buffer buffer);
extern XLogRecPtr BufferGetLSNAtomic(Buffer buffer);
-
-#ifdef NOT_USED
-extern void PrintPinnedBufs(void);
-#endif
extern void BufferGetTag(Buffer buffer, RelFileLocator *rlocator,
ForkNumber *forknum, BlockNumber *blknum);