Skip to content

Conversation

@reshke
Copy link
Contributor

@reshke reshke commented Dec 12, 2025

Turns out, CREATE EXTENSION pg_buffercache does not work on main.

It is failing due pg_buffercache_usage_counts function is missing.
This function was committed to PostgreSQL as part of postgres/postgres@f3fa313
Extension sql 1.4.1 version was cherry-picked to Cloudberry as part of #883 (see commit 79f2d28)

 CREATE EXTENSION pg_buffercache;
+ERROR:  function pg_buffercache_usage_counts() does not exist

This pr fixes cherry-pick issues, and adds this extension to ic-contrib check

Found during PG16 rebase work

Original commit msg:

It was pointed out that pg_buffercache_summary()'s report of the overall average usage count isn't that useful, and what would be more helpful in many cases is to report totals for each possible usage count. Add a new function to do it like that. Since pg_buffercache 1.4 is already new for v16, we don't need to create a new extension version; we'll just define this as part of 1.4.

Nathan Bossart

Discussion: https://postgr.es/m/20230130233040.GA2800702@nathanxps13

@reshke reshke requested a review from avamingli December 12, 2025 12:47
Copy link
Contributor

@avamingli avamingli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, LGTM.

tglsfdc and others added 2 commits December 13, 2025 15:31
It was pointed out that pg_buffercache_summary()'s report of
the overall average usage count isn't that useful, and what
would be more helpful in many cases is to report totals for
each possible usage count.  Add a new function to do it like
that.  Since pg_buffercache 1.4 is already new for v16,
we don't need to create a new extension version; we'll just
define this as part of 1.4.

Nathan Bossart

Discussion: https://postgr.es/m/20230130233040.GA2800702@nathanxps13
@reshke reshke merged commit 5f591f2 into apache:main Dec 13, 2025
162 of 168 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants