]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Modernize and optimize pg_buffercache_pages()
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 7 Apr 2026 13:04:48 +0000 (16:04 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 7 Apr 2026 13:04:48 +0000 (16:04 +0300)
commit257c8231bf97a77378f6fedb826b1243f0a41612
treeb60c6a1cd653e90848a0dab06d4fb34f1184f6da
parent9f3755ea07aa8858999bdac3d33151e93d2643e2
Modernize and optimize pg_buffercache_pages()

Refactor pg_buffercache_pages() to use SFRM_Materialize mode and
construct a tuplestore directly. That's simpler and more efficient
than collecting all the data to a custom array first.

Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Author: Palak Chaturvedi <chaturvedipalak1911@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAExHW5sMsaz1j+hrdhyo-DJp7JCgJx87=q2iJfOc_9mwYWyvmw@mail.gmail.com
contrib/pg_buffercache/pg_buffercache_pages.c