Re: ReadRecentBuffer() doesn't scale well

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org, Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, pgsql-hackers(at)postgresql(dot)org, Ants Aasma <ants(at)cybertec(dot)at>
Subject: Re: ReadRecentBuffer() doesn't scale well
Date: 2025-10-10 16:08:24
Message-ID: nqe3z7nm7j3pvcz3lznxqcrrm266hsailrqlqxazqvzh7t2dll@nwaypsyvkafp
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2025-10-08 22:09:54 -0400, Andres Freund wrote:
> On October 8, 2025 10:05:59 PM EDT, Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> >On Thu, Oct 9, 2025 at 2:15 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> >> On 2025-10-08 13:39:14 +1300, Thomas Munro wrote:
> >> > On Fri, Sep 19, 2025 at 11:44 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> >> > > On Fri, Sep 19, 2025 at 12:36 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> >> > > > I'm planning to commit 0001 soon, unless you'd like to do the honors - I would
> >> > > > break it with some upcoming patches, and it's a good improvement. Those
> >> > > > patches also will PinBuffer_Locked() a bit slower, i.e. it'd be good to avoid
> >> > > > using it in ReadRecentBuffer() for that reason alone.
> >> > >
> >> > > Oh, thanks for thinking about that interaction. I'll go ahead and
> >> > > push it later today after I re-convince myself that it's correct.
> >> >
> >> > Sorry I haven't got to this yet. Please feel free to go ahead and
> >> > push it if it's blocking you...
> >>
> >> Done after two small changes:
> >
> >Perhaps you are on it, but it seems skink is red due to either this or
> >one of the other bufmgr changes. I noticed it after I pushed a patch
> >of mine and couldn't see the connection.
> >
> >postmaster.log suggests a valgrind error.
>
> Yes, I saw it. I'm too tired to figure it out tonight, will look more
> tomorrow. I think it'll just need to mark the buffer data accessible in one
> more spot.

To update this thread as well:
This is fixes as of
https://git.postgresql.org/pg/commitdiff/c819d1017ddb349d92ab323d2631bc1f10bb4e86
the change from this thread wasn't to blame, it was 5e899859287.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2025-10-10 16:24:43 Re: ReadRecentBuffer() doesn't scale well
Previous Message Tom Lane 2025-10-10 15:58:42 Re: RFC: extensible planner state