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

Commit23d7562

Browse files
committed
Remove PrintBufferDescs() and PrintPinnedBufs().
These have been #ifdef'd out for a long time, and in fact havebeen uncompilable since commit4835458 of 2016-04-10. Thefact that nobody noticed for so long demonstrates their lack ofusefulness, 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
1 parentea5ff58 commit23d7562

File tree

2 files changed

+0
-62
lines changed

2 files changed

+0
-62
lines changed

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

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4412,64 +4412,6 @@ DropDatabaseBuffers(Oid dbid)
44124412
}
44134413
}
44144414

4415-
/* -----------------------------------------------------------------
4416-
*PrintBufferDescs
4417-
*
4418-
*this function prints all the buffer descriptors, for debugging
4419-
*use only.
4420-
* -----------------------------------------------------------------
4421-
*/
4422-
#ifdefNOT_USED
4423-
void
4424-
PrintBufferDescs(void)
4425-
{
4426-
inti;
4427-
4428-
for (i=0;i<NBuffers;++i)
4429-
{
4430-
BufferDesc*buf=GetBufferDescriptor(i);
4431-
Bufferb=BufferDescriptorGetBuffer(buf);
4432-
4433-
/* theoretically we should lock the bufhdr here */
4434-
elog(LOG,
4435-
"[%02d] (freeNext=%d, rel=%s, "
4436-
"blockNum=%u, flags=0x%x, refcount=%u %d)",
4437-
i,buf->freeNext,
4438-
relpathbackend(BufTagGetRelFileLocator(&buf->tag),
4439-
INVALID_PROC_NUMBER,BufTagGetForkNum(&buf->tag)),
4440-
buf->tag.blockNum,buf->flags,
4441-
buf->refcount,GetPrivateRefCount(b));
4442-
}
4443-
}
4444-
#endif
4445-
4446-
#ifdefNOT_USED
4447-
void
4448-
PrintPinnedBufs(void)
4449-
{
4450-
inti;
4451-
4452-
for (i=0;i<NBuffers;++i)
4453-
{
4454-
BufferDesc*buf=GetBufferDescriptor(i);
4455-
Bufferb=BufferDescriptorGetBuffer(buf);
4456-
4457-
if (GetPrivateRefCount(b)>0)
4458-
{
4459-
/* theoretically we should lock the bufhdr here */
4460-
elog(LOG,
4461-
"[%02d] (freeNext=%d, rel=%s, "
4462-
"blockNum=%u, flags=0x%x, refcount=%u %d)",
4463-
i,buf->freeNext,
4464-
relpathperm(BufTagGetRelFileLocator(&buf->tag),
4465-
BufTagGetForkNum(&buf->tag)),
4466-
buf->tag.blockNum,buf->flags,
4467-
buf->refcount,GetPrivateRefCount(b));
4468-
}
4469-
}
4470-
}
4471-
#endif
4472-
44734415
/* ---------------------------------------------------------------------
44744416
*FlushRelationBuffers
44754417
*

‎src/include/storage/bufmgr.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,6 @@ extern void DropDatabaseBuffers(Oid dbid);
275275

276276
externboolBufferIsPermanent(Bufferbuffer);
277277
externXLogRecPtrBufferGetLSNAtomic(Bufferbuffer);
278-
279-
#ifdefNOT_USED
280-
externvoidPrintPinnedBufs(void);
281-
#endif
282278
externvoidBufferGetTag(Bufferbuffer,RelFileLocator*rlocator,
283279
ForkNumber*forknum,BlockNumber*blknum);
284280

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp