Skip to content
VdsRent
Advanced11 min read

Host a PostgreSQL database on a high-memory plan

Sizing, the settings worth changing, and a restore you have actually tested.

Last updated 1 August 2026

The goal is simple: keep the working set in memory and keep enough free disk for the write-ahead log to grow between checkpoints.

Settings worth changing

Starting points on a 32 GB plan
SettingValueWhy
shared_buffers8GBRoughly a quarter of memory.
effective_cache_size24GBA hint about what the kernel caches.
work_mem32MBPer sort or hash node, so raise it carefully.
maintenance_work_mem2GBSpeeds up VACUUM and index builds.

Backups

bash
pg_dump --format=custom --file=/var/backups/app.dump app

A backup you have not restored is a guess

Restore into a scratch database at least once, and time it. That number is your recovery objective, whatever your notes say.

Was this page useful?

Feedback about article postgres-high-memory
Host a PostgreSQL database on a high-memory plan — Guide — VdsRent