Old BufferDesc refcount in PrintBufferDescs and PrintPinnedBufs

Jacob Brazeal <jacob.brazeal@gmail.com>

From: Jacob Brazeal <jacob.brazeal@gmail.com>
To: pgsql-hackers@postgresql.org
Date: 2025-01-17T22:11:56Z
Lists: pgsql-hackers

Attachments

Hi,

In bufmgr.c we have the debugging functions PrintBufferDescs
and PrintPinnedBufs, which are typically hidden behind the flag
#ifdef NOT_USED. These functions reference the old buf->refcount and
buf->flags fields, and so they no longer compile. I attached a patch to
use BUF_STATE_GET_REFCOUNT instead and removed the reference to buf->flags.

Regards,
Jacob Brazeal

Commits

  1. Remove PrintBufferDescs() and PrintPinnedBufs().