Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit525de8d

Browse files
committed
Improve /contrib/pg_buffercache installation to use BEGIN/COMMIT,
improve examples.Mark Kirkwood
1 parent136bea1 commit525de8d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎contrib/pg_buffercache/README.pg_buffercache

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

‎contrib/pg_buffercache/pg_buffercache.sql.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
-- Adjust this setting to control where the objects get created.
2+
BEGIN;
23
SET 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.
1718
REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM PUBLIC;
1819
REVOKE ALL ON pg_buffercache FROM PUBLIC;
20+
21+
COMMIT;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp