The Visibility Map is one of the important architectural notes of PostgreSQL.
The Visibility Map associates with each Table and Index.
It is stored in separate relation alongside with main relation and It starts with the filenode number plus a suffix _vm.
The Visibility Map uses to keep track of which pages contain only tuples that are known to be visible to all active transactions.
It stores one bit per page. If it is set bit that means no free space on the page and all tuples can visible to running transaction.
If you do not know about the MVCC (Multiversion Concurrency Control), please visit below article.
Why VACUUM requires in MVCC because VACUUM removes dead row versions in tables and marks the space available for future reuse.
With the Visibility Map, VACUUM will be now able to perform partial scans of the table data, skipping pages which are marked as fully visible.
Now Database Administrator happy because partial scans require fewer I/O operations for VACUUM.
The Visibility map bits are only set by vacuum, but are cleared by any data-modifying operations on a page.
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.