Shared memory
The shared memory settings are important to get right because they will always require a full database restart to change—the server cannot re-allocate shared memory dynamically.
shared_buffers
Setting shared_buffers
usefully was the topic of most of the last chapter.
Free space map (FSM) settings
Space left behind from deletions or updates of data is placed into a free space map by VACUUM
, and then new allocations are done from that free space first, rather than by allocating new disk for them instead.
Starting in PostgreSQL 8.4, the FSM is stored on disk, and therefore scales in size automatically. In PostgreSQL versions up to 8.3, the FSM was stored in shared memory, which required monitoring how much of it was being used potentially increasing it in size. Making sure the FSM settings in the configuration file such as max_fsm_pages
and max_fsm_relations
are sufficient should be part if your regular system maintenance on these versions. This can be run...