There are two more settings in postgresql.conf that are quite important to understand:
autovacuum_freeze_max_age = 200000000 autovacuum_multixact_freeze_max_age = 400000000
To understand the overall problem, it is important to understand how PostgreSQL handles concurrency. The PostgreSQL transaction machinery is based on the comparison of transaction IDs and the states transactions are in.
Let's look at an example. If I am transaction ID 4711 and if you happen to be 4712, I won't see you because you are still running. If I am transaction ID 4711 but you are transaction ID 3900, I will see you provided you have committed, and I will ignore you if you failed.
The trouble is as follows: transaction ...