Free Space Map settings

Space left behind from deletions or updates of data is placed into a Free Space Map (FSM) by VACUUM, and then new allocations are done from that free space first, rather than by allocating new disk space 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 of your regular system maintenance on these versions. This can be run manually or by executing VACUUM VERBOSE ...

Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.