Re: [GENERAL] Autovacuum stuck for hours, blocking queries

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: [GENERAL] Autovacuum stuck for hours, blocking queries
Дата
Msg-id CAHyXU0x5xqAqgBQw+D1iU3DEr0H8+k5tX4LQO3THzT0C3QKiQw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Autovacuum stuck for hours, blocking queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [GENERAL] Autovacuum stuck for hours, blocking queries  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-general


On Thursday, February 16, 2017, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Tim Bellis <Tim.Bellis@metaswitch.com> writes:
> Even though this is a read only query, is it also expected to be blocked behind the vacuum? Is there a way of getting indexes for a table which won't be blocked behind a vacuum?

It's not the vacuum that's blocking your read-only queries.  It's the
ALTER TABLE, which needs an exclusive lock in order to alter the table's
schema.  The ALTER is queued waiting for the vacuum to finish, and lesser
lock requests queue up behind it.  We could let the non-exclusive lock
requests go ahead of the ALTER, but that would create a severe risk of the
ALTER *never* getting to run.

I'd kill the ALTER and figure on trying again after the vacuum is done.


I've been drilled by this and similar lock stacking issues enough times to make me near 100% sure deferring the ALTER would be the better choice


merlin

В списке pgsql-general по дате отправления:

Предыдущее
От: Venkata B Nagothi
Дата:
Сообщение: Re: [GENERAL] Streaming Replication Without Downtime
Следующее
От: Sushant Pawar
Дата:
Сообщение: Re: [GENERAL] Search on very big (partitioned) table