summaryrefslogtreecommitdiff
path: root/src/backend/storage
diff options
context:
space:
mode:
authorTom Lane2025-01-19 19:00:22 +0000
committerTom Lane2025-01-19 19:00:22 +0000
commit23d7562018b2c772aec26f4641de211d8a930b26 (patch)
tree02877dc7ce389a5d47d00ff89b9326fe3c793581 /src/backend/storage
parentea5ff5833c7d4ae727a5acfc590c848b520775d0 (diff)
Remove PrintBufferDescs() and PrintPinnedBufs().HEADmaster
These have been #ifdef'd out for a long time, and in fact have been uncompilable since commit 48354581a of 2016-04-10. The fact that nobody noticed for so long demonstrates their lack of usefulness, so let's remove them rather than fix them. Author: Jacob Brazeal <[email protected]> Discussion: https://postgr.es/m/CA+COZaB+9CN_f63PPRoVhHjYmCwwmb_9CWLxqCJdMWDqs1a-JA@mail.gmail.com
Diffstat (limited to 'src/backend/storage')
-rw-r--r--src/backend/storage/buffer/bufmgr.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 739daa1153..0d8849bf89 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -4412,64 +4412,6 @@ DropDatabaseBuffers(Oid dbid)
}
}
-/* -----------------------------------------------------------------
- * 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
*