Re: Summary function for pg_buffercache - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: Summary function for pg_buffercache
Date
Msg-id CAJ7c6TO_T4QaKEfquZKbkXeC1Ktu2cSJp7sKCi-LbEGqyg=79w@mail.gmail.com
Whole thread Raw
In response to Re: Summary function for pg_buffercache  (Zhang Mingli <zmlpostgres@gmail.com>)
Responses Re: Summary function for pg_buffercache
List 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



pgsql-hackers by date:

Previous
From: Zhang Mingli
Date:
Subject: Re: Summary function for pg_buffercache
Next
From: Zhang Mingli
Date:
Subject: Re: Summary function for pg_buffercache