"First of all, pay attention to the following settings: - work_mem/max_connections pair - autovacuum_work_mem/autovacuum_max_workers pair"