sharedbuffers: knowledge that doesn't get lost on disk

In PostgreSQL, shared_buffers is the parameter that defines the size of the buffer pool — the memory area where data pages are kept warm so queries don’t need to hit the disk on every access.

When a page is in the buffer, it’s immediately available to any database process. That’s the point: shared memory that speeds everything up.

This blog’s name comes from that, but the metaphor goes a bit further than the parameter.

What sharedbuffers is

sharedbuffers is a blog about PostgreSQL. Not about PostgreSQL in general — about the PostgreSQL you run in production, that you need to tune when latency spikes at 3am, that you need to understand deeply when a client asks why a query that worked yesterday suddenly doesn’t.

The name is a double reference: to the shared_buffers parameter, and to the idea of shared knowledge. A buffer of experience that doesn’t need to be reloaded from scratch every time.

Who this blog is for

For people who work with PostgreSQL and want to go beyond SELECT * FROM. For DBAs who already know what an index is but want to understand when not to create one. For developers who noticed a slow query and need to know where to start. For sysadmins who need to configure a PostgreSQL server deliberately, not by guesswork.

We won’t cover the basics by design. The assumption here is that you already have PostgreSQL running and want to understand what’s happening underneath.

What you’ll find here

Memory tuning and parameter configuration. Query plan analysis — the EXPLAIN ANALYZE outputs that reveal what the planner was actually thinking. Backup strategies, replication, high availability.

All with real examples — queries you can run on your own database right now and compare with what you find here.

Where it makes sense, each post will have a Portuguese version too, since most of this content is also written for the Brazilian PostgreSQL community.

About sharedbuffers

This blog is maintained by people who work with PostgreSQL in production every day. The idea was straightforward from the start: write down what we learn before it gets lost in the daily grind — and share it with people dealing with the same problems.

Enjoy.