Remove PrintBufferDescs() and PrintPinnedBufs().
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 <jacob.brazeal@gmail.com> Discussion: https://postgr.es/m/CA+COZaB+9CN_f63PPRoVhHjYmCwwmb_9CWLxqCJdMWDqs1a-JA@mail.gmail.com
This commit is contained in:
parent
ea5ff5833c
commit
23d7562018
@ -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
|
* FlushRelationBuffers
|
||||||
*
|
*
|
||||||
|
@ -275,10 +275,6 @@ extern void DropDatabaseBuffers(Oid dbid);
|
|||||||
|
|
||||||
extern bool BufferIsPermanent(Buffer buffer);
|
extern bool BufferIsPermanent(Buffer buffer);
|
||||||
extern XLogRecPtr BufferGetLSNAtomic(Buffer buffer);
|
extern XLogRecPtr BufferGetLSNAtomic(Buffer buffer);
|
||||||
|
|
||||||
#ifdef NOT_USED
|
|
||||||
extern void PrintPinnedBufs(void);
|
|
||||||
#endif
|
|
||||||
extern void BufferGetTag(Buffer buffer, RelFileLocator *rlocator,
|
extern void BufferGetTag(Buffer buffer, RelFileLocator *rlocator,
|
||||||
ForkNumber *forknum, BlockNumber *blknum);
|
ForkNumber *forknum, BlockNumber *blknum);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user