Re: concurrent SELECT blocking ALTER?

Поиск
Список
Период
Сортировка
От Neil Harkins
Тема Re: concurrent SELECT blocking ALTER?
Дата
Msg-id CAMtfGdWzOn1KHA-mwE1Xz-dXY=81rwK47_n1ivzEn6iy1d0Faw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: concurrent SELECT blocking ALTER?  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: concurrent SELECT blocking ALTER?
Список pgsql-general
I totally understand DDL taking exclusive locks, the problem here seems to be that the *SELECTs* are taking out exclusive locks, locking out the ALTER, which feels like a bug.

On Wednesday, January 29, 2014, Peter Eisentraut <peter_e@gmx.net> wrote:
On 1/29/14, 4:59 PM, Neil Harkins wrote:
> Why are those exclusive locks present?
> Can't the database rely on mvcc for those reads
> without locking? The autocommit should be
> increasing the xid used for the reads, so the
> ALTER should be able to slip in-between?

One would think so, but it's more complicated.  There is a long thread
on pgsql-hackers spreading over many months that discusses the
intricacies of reducing the strength of the locks taken by DDL commands.
 This is being addressed, but at the moment most DDL commands take
exclusive locks.

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: concurrent SELECT blocking ALTER?
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: concurrent SELECT blocking ALTER?