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