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


Reply via email to