This worked fine for many months, but of late a new problem has started. At the time of disabling and enabling, we are seeing large performance degradation. Several hundred connections like this:
19090 ? Ss 0:00 postgres: user dbname 10.13.36.19(42782) PARSE waiting 19091 ? Ss 0:00 postgres: user dbname 10.13.36.19(42783) PARSE waiting 19092 ? Ss 0:00 postgres: user dbname 10.13.36.19(42784) PARSE waiting 19093 ? Ss 0:00 postgres: user dbname 10.13.36.19(42785) PARSE waiting 19095 ? Ss 0:00 postgres: user dbname 10.13.36.19(42786) PARSE waiting
So obviously, disabling/enabling autovacuum has side-effects.
Use the queries in this link to find out what is blocking these transactions.