From: | Jacob Brazeal <jacob(dot)brazeal(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Re: Old BufferDesc refcount in PrintBufferDescs and PrintPinnedBufs |
Date: | 2025-01-18 07:14:02 |
Message-ID: | CA+COZaAf6QPB+zaEeY9V3uHmHVu9+qYN_V8XVo5_+2EsWZQf+g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 17, 2025 at 9:53 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jacob Brazeal <jacob(dot)brazeal(at)gmail(dot)com> 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
> > use BUF_STATE_GET_REFCOUNT instead and removed the reference to
> buf->flags.
>
> Hmm. So those functions have not compiled since 48354581a of
> 2016-04-10, and nobody's noticed. Moreover, whatever use-case
> they do have would be reduced a good deal by taking a buffer
> lock (which might not be available, or our own process might
> hold it already).
>
> I'd vote for just removing them...
>
> regards, tom lane
>
Sounds good! v3 attached.
Attachment | Content-Type | Size |
---|---|---|
v3-buf-helper-compile-err.patch | application/octet-stream | 2.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Gilles Darold | 2025-01-18 07:24:04 | Re: Fwd: Re: proposal: schema variables |
Previous Message | Jeff Davis | 2025-01-18 06:42:15 | Re: Collation & ctype method table, and extension hooks |