2

I am new to PostgreSQL and I would like to understand how can I see the utilization of shared_buffers in my PostgreSQL instance.

Let's assume I have shared_buffers = 8GB in my configuration, is there a way to check how much is being used in that 8GB?

Many Thanks, Suresh.

1 Answer 1

7

Use the pg_buffercache extension:

CREATE EXTENSION pg_buffercache;

That provides a view of the same name that shows exactly what is stored where.

You can find empty buffers by looking for entries with usagecount IS NULL, but unless the server is newly started or the database is smaller than shared_buffers, you probably won't find any.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you Laurenz Albe for your quick help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.