-
Sub-task
-
Resolution: Fixed
-
Trivial
-
None
-
None
-
S24-W18/19
-
0.5
Since PostegreSQL 10, it is possible to use more effective query to find active autovacuums. It is possible due to appearance of backend_type column in pg_stat_activity.
SQL query should be changed
from OLD one:
SELECT count(*) FROM pg_catalog.pg_stat_activity WHERE query like '%%autovacuum%%' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()
to NEW one:
SELECT count(*) FROM pg_catalog.pg_stat_activity WHERE backend_type = 'autovacuum worker' AND state <> 'idle' AND pid <> pg_catalog.pg_backend_pid()