Re: [GENERAL] Autovacuum stuck for hours, blocking queries
| От | Jeff Janes |
|---|---|
| Тема | Re: [GENERAL] Autovacuum stuck for hours, blocking queries |
| Дата | |
| Msg-id | CAMkU=1xppfjHoTwrAW291qqA5hejkwxqyH4PrhHHBPtU8=C1SQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: [GENERAL] Autovacuum stuck for hours, blocking queries (Tim Bellis <Tim.Bellis@metaswitch.com>) |
| Список | pgsql-general |
From: Jeff Janes [mailto:jeff.janes@gmail.com]
Sent: 17 February 2017 02:59
To: Tim Bellis <Tim.Bellis@metaswitch.com>
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Autovacuum stuck for hours, blocking queries
On Wed, Feb 15, 2017 at 9:30 AM, Tim Bellis <Tim.Bellis@metaswitch.com> wrote:
I have a postgres 9.3.4 database table which (intermittently but reliably) gets into a state where queries get blocked indefinitely (at least for many hours) behind an automatic vacuum. I was under the impression that vacuum should never take any blocking locks for any significant period of time, and so would like help resolving the issue.
The process blocking the query is:
postgres 21985 11304 98 Feb13 ? 1-14:20:52 postgres: autovacuum worker process <db_name>
which is running the query
autovacuum: VACUUM public.<table_name>
Are you sure it doesn't really say:
autovacuum: VACUUM public.<table_name> (to prevent wraparound)
[Tim Bellis] It doesn’t. I was using the query from https://wiki.postgresql.org/
wiki/Lock_Monitoring and looking at the ‘current_statement_in_ blocking_process’ column. Is there a different query I should be using?
В списке pgsql-general по дате отправления: