Re: Old BufferDesc refcount in PrintBufferDescs and PrintPinnedBufs

2025-01-19 Thread Tom Lane
Andres Freund writes: > On 2025-01-19 09:37:54 +0900, Michael Paquier wrote: >> Removal sounds good to me. Any objections from anybody? >> Andres, perhaps you have some experience using that and would prefer >> keep them and make them work? > I think they're pretty useless, tbh. There's too many

Re: Old BufferDesc refcount in PrintBufferDescs and PrintPinnedBufs

2025-01-19 Thread Andres Freund
Hi, On 2025-01-19 09:37:54 +0900, Michael Paquier wrote: > On Fri, Jan 17, 2025 at 11:14:02PM -0800, Jacob Brazeal wrote: > > Sounds good! v3 attached. > > Removal sounds good to me. Any objections from anybody? > > Andres, perhaps you have some experience using that and would prefer > keep the

Re: Old BufferDesc refcount in PrintBufferDescs and PrintPinnedBufs

2025-01-18 Thread Michael Paquier
On Fri, Jan 17, 2025 at 11:14:02PM -0800, Jacob Brazeal wrote: > Sounds good! v3 attached. Removal sounds good to me. Any objections from anybody? Andres, perhaps you have some experience using that and would prefer keep them and make them work? -- Michael signature.asc Description: PGP signat

Re: Old BufferDesc refcount in PrintBufferDescs and PrintPinnedBufs

2025-01-17 Thread Jacob Brazeal
On Fri, Jan 17, 2025 at 9:53 PM Tom Lane wrote: > Jacob Brazeal writes: > > 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 fie

Re: Old BufferDesc refcount in PrintBufferDescs and PrintPinnedBufs

2025-01-17 Thread Tom Lane
Jacob Brazeal writes: > 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 >

Re: Old BufferDesc refcount in PrintBufferDescs and PrintPinnedBufs

2025-01-17 Thread Jacob Brazeal
Since this patch takes out a lock to read the BufferDesc state, I also need to release the lock, which I've added to this patch. On Fri, Jan 17, 2025 at 2:11 PM Jacob Brazeal wrote: > Hi, > > In bufmgr.c we have the debugging functions PrintBufferDescs > and PrintPinnedBufs, which are typically

Old BufferDesc refcount in PrintBufferDescs and PrintPinnedBufs

2025-01-17 Thread Jacob Brazeal
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 i