Re: Summary function for pg_buffercache

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Zhang Mingli <zmlpostgres(at)gmail(dot)com>, Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>
Subject: Re: Summary function for pg_buffercache
Date: 2022-09-20 12:43:25
Message-ID: CAJ7c6TO_T4QaKEfquZKbkXeC1Ktu2cSJp7sKCi-LbEGqyg=79w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Zhang,

> 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 [...]
> ```

Correct, the procedure doesn't take the locks of the buffer manager.
It does take the locks of every individual buffer.

I agree that the text is somewhat confusing, but it is consistent with
the current description of pg_buffercache [1]. I think this is a
problem worth addressing but it also seems to be out of scope of the
proposed patch.

[1]: https://www.postgresql.org/docs/current/pgbuffercache.html

--
Best regards,
Aleksander Alekseev

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhang Mingli 2022-09-20 12:48:59 Re: Summary function for pg_buffercache
Previous Message Zhang Mingli 2022-09-20 12:29:30 Re: Summary function for pg_buffercache