From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Rare deadlock failure in create_am test |
Date: | 2020-09-04 14:20:33 |
Message-ID: | 20200904142033.GA8294@alvherre.pgsql |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2020-09-04 14:34:39 | Re: Division in dynahash.c due to HASH_FFACTOR |
Previous Message | Ashutosh Bapat | 2020-09-04 14:12:27 | Re: Report error position in partition bound check |