Recently I was working on tuning the PostgreSQL server configuration and the research led me to two very useful resources which perfectly explain the process of the PostgreSQL vacuum, while also unveiling useful information related to the PostgreSQL internals and I thought that it is worth sharing with you.
These resources are the following :
https://www.percona.com/blog/2018/08/10/tuning-autovacuum-in-postgresql-and-autovacuum-internals/
and
https://www.percona.com/blog/2018/08/06/basic-understanding-bloat-vacuum-postgresql-mvcc/
Furthermore I have created a sample docker-compose.yml file with the PostgreSQL image already configured for automatic vacuum operations.
You can find the configuration here :