Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock
Дата
Msg-id 1280319846.27873.7.camel@fsopti579.F-Secure.com
обсуждение исходный текст
Ответ на Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock  (Simon Riggs <simon@2ndQuadrant.com>)
Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
On tor, 2010-07-15 at 10:24 +0100, Simon Riggs wrote:
> Patch to reduce lock levels for 
>  ALTER TABLE
>  CREATE TRIGGER
>  CREATE RULE

Tried this out, but $subject is still the case.  The problem is that
ATRewriteCatalogs() calls AlterTableCreateToastTable() based on what it
thinks the subcommands are, and AlterTableCreateToastTable() takes an
AccessExclusiveLock.

This could possibly be addressed by moving AT_SetStatistics to
AT_PASS_MISC in order to avoid the TOAST table call.

In a related matter, assigning ShareUpdateExclusiveLock to AT_SetStorage
doesn't work either, because the TOAST table call needs to be done in
that case.

Perhaps this logic needs to be refactored a bit more so that there
aren't any inconsistencies between the lock modes and the "passes",
which could lead to false expectations and deadlocks.



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

Предыдущее
От: Yeb Havinga
Дата:
Сообщение: Re: Query optimization problem
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock