I have a 14.7 TB Postgres(9.1) database that has to endure heavy writes for prolonged periods of time. I know that I need to closely manage my transaction ids to prevent db lockup. Recently I noticed the queries slowing, and saw that there were multiple autovacuums running on our massive read-only tables, with the "(to prevent wraparound)" subscript. I stopped the running software and executed a
vacuumdb -F -a command. However, when I run
select current_query from pg_stat_activity I see that the autovacuum processes are still running, even during a manual vacuum. I tried killing the autovacuums with
select pg_cancel_backend(pid) and they died but then immediately restart again. My questions:
- Is autovacuum supposed to continue to run during a manual db vacuum?
- How do I effectively get these autovacuum processes to stop?
- Why would these autovacuums continue to run on a read-only table? What is there to vacuum?