I'm running Postgres 14.6, and have a number of sessions with a
wait event described as
Timeout: VacuumDelay. The SQL being run by the session is....
autovacuum: VACUUM public.mytable_202110 (to prevent wraparound)
(this information is gleaned from the dashboard on pgAdmin4)
I have a number of questions
- These sessions are highlighted in red, does that mean there is problem?
- The query started many hours ago and the state hasn't changed recently is this significant?
- Is this session actually telling me? is it actively VACUUMing right now? or is it waiting for the opportunity to start VACUUMing? Or is it an unrelated session saying it can't do anything until VACUUMing has finished?
- The table(s) being VACUUMed are very old, very large and very rarely change. Do they need to be VACUUMed?
There are no blocking PIDS listed, and all locks have been granted. The database is up and running (albeit slowly)
UPDATE - this may be relevant, this database has just been transferred from an old, slow server to a newer and better machine. I'd hoped to see significantly better performance, but I'm guessing that statistics and analysis data on the tables does NOT get transferred over with the original data, so the new database is spending a lot of resources analysing old, archived data.