Skip to content

Commit 9b40233

Browse files
committed
m1: include system catalogs in buffer cache report
System catalogs (pg_class, pg_proc, etc.) are often the biggest cache consumers. Excluding them gave empty results on small databases and hid useful information on large ones.
1 parent 9ef18b0 commit 9b40233

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sql/m1_buffercache.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ with buf as (
4242
where b.reldatabase = (select oid from pg_database where datname = current_database())
4343
and b.relfilenode is not null
4444
and b.relforknumber = 0
45-
and n.nspname not in ('pg_catalog', 'information_schema')
46-
and n.nspname !~ '^pg_toast'
45+
-- include all schemas (system catalogs are often the biggest cache consumers)
4746
group by c.oid, n.nspname, c.relname, c.relkind
4847
)
4948
select

0 commit comments

Comments
 (0)