Re: Rare deadlock failure in create_am test

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Rare deadlock failure in create_am test
Дата
Msg-id 20200904142033.GA8294@alvherre.pgsql
обсуждение исходный текст
Ответ на Rare deadlock failure in create_am test  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Rare deadlock failure in create_am test
Список pgsql-hackers
On 2020-Sep-03, Tom Lane wrote:

> So it's not hard to understand the problem: DROP of an index AM, cascading
> to an index, will need to acquire lock on the index and then lock on the
> index's table.  Any other operation on the table, like say autovacuum,
> is going to acquire locks in the other direction.

Oh, of course.

> I'm inclined to think that the best fix is to put
> 
> begin;
> lock table [fast_emp4000];
> ...
> commit;
> 
> around the DROP CASCADE.

Yeah, sounds good.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Report error position in partition bound check
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Division in dynahash.c due to HASH_FFACTOR