Type: integer
Default: -1 (-1)
Min: -1 (-1)
Max: 2147483647 (2147483647kB)
Unit: KB
Context: sighup
Restart: false
Since: 9.4

Specifies the maximum amount of memory to be used by each autovacuum worker process. If this value is specified without units, it is taken as kilobytes. It defaults to -1, indicating that the value of maintenance_work_mem should be used instead. The setting has no effect on the behavior of VACUUM when run in other contexts. This parameter can only be set in the postgresql.conf file or on the server command line.

For the collection of dead tuple identifiers, autovacuum is only able to utilize up to a maximum of 1GB of memory, so setting autovacuum_work_mem to a value higher than that has no effect on the number of dead tuples that autovacuum can collect while scanning a table.


Set a limit on this which is based on the number of autovac workers you expect to have running.