File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,9 @@ Sample output
7676 isdirty boolean);
7777
7878 regression=# SELECT c.relname, count(*) AS buffers
79- FROM pg_class c, pg_buffercache b
80- WHERE b.relfilenode = c.relfilenode
79+ FROM pg_class c INNER JOIN pg_buffercache b
80+ ON b.relfilenode = c.relfilenode INNER JOIN pg_database d
81+ ON (b.reldatabase = d.oid AND d.datname = current_database())
8182 GROUP BY c.relname
8283 ORDER BY 2 DESC LIMIT 10;
8384 relname | buffers
Original file line number Diff line number Diff line change 11-- Adjust this setting to control where the objects get created.
2+ BEGIN;
23SET search_path = public;
34
45-- Register the function.
@@ -16,3 +17,5 @@ CREATE VIEW pg_buffercache AS
1617-- Don't want these to be available at public.
1718REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM PUBLIC;
1819REVOKE ALL ON pg_buffercache FROM PUBLIC;
20+
21+ COMMIT;
You can’t perform that action at this time.
0 commit comments