From c3592359a66d4583c306e4b46d991f961a81db37 Mon Sep 17 00:00:00 2001 From: Sean Linsley Date: Tue, 19 Nov 2024 15:38:42 -0600 Subject: [PATCH] Exclude unused pages from buffer cache monitoring --- input/postgres/buffer_cache.go | 1 + 1 file changed, 1 insertion(+) diff --git a/input/postgres/buffer_cache.go b/input/postgres/buffer_cache.go index c6bb64060..3cc055bcd 100644 --- a/input/postgres/buffer_cache.go +++ b/input/postgres/buffer_cache.go @@ -28,6 +28,7 @@ WHERE name = 'shared_buffers' const bufferCacheSQL string = ` SELECT reldatabase, relfilenode, count(*) * current_setting('block_size')::int FROM %s.pg_buffercache +WHERE reldatabase IS NOT NULL -- filters out unused pages GROUP BY 1, 2 `