Re: Summary function for pg_buffercache

From: Zhang Mingli <zmlpostgres(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Subject: Re: Summary function for pg_buffercache
Date: 2022-09-20 12:29:30
Message-ID: 885e438b-9d10-4d1f-a3ad-dc7beabfa679@Spark
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Correct me if I’m wrong.

The doc says we don’t take lock during pg_buffercache_summary, but I see locks in the v8 patch, Isn’t it?

```
Similar to <function>pg_buffercache_pages</function> function
 <function>pg_buffercache_summary</function> doesn't take buffer manager
 locks, thus the result is not consistent across all buffers. This is
 intentional. The purpose of this function is to provide a general idea about
 the state of shared buffers as fast as possible. Additionally,
 <function>pg_buffercache_summary</function> allocates much less memory.

```

Regards,
Zhang Mingli
On Sep 20, 2022, 20:10 +0800, Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>, wrote:
> Hi,
>
> Seems like cfbot tests are passing now:
> https://cirrus-ci.com/build/4727923671302144
>
> Best,
> Melih
>
> > Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>, 20 Eyl 2022 Sal, 14:00 tarihinde şunu yazdı:
> > > Aleksander Alekseev <aleksander(at)timescale(dot)com>, 20 Eyl 2022 Sal, 13:57 tarihinde şunu yazdı:
> > > > > There was a missing empty line in pg_buffercache.out which made the
> > > > > tests fail. Here is a corrected v8 patch.
> > > >
> > > > I was just sending a corrected patch without the missing line.
> > > >
> > > > Thanks a lot for all these reviews and the corrected patch.
> > > >
> > > > Best,
> > > > Melih

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2022-09-20 12:43:25 Re: Summary function for pg_buffercache
Previous Message Robert Haas 2022-09-20 12:20:52 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands