Re: Rare deadlock failure in create_am test
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2020-09-04T14:20:33Z
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
Commits
-
Fix rare deadlock failure in create_am regression test.
- d54f99e41541 14.0 landed
- b2fcaed66a4a 9.6.20 landed
- afec6ba0bae0 13.0 landed
- aa4eeb38f3aa 12.5 landed
- 44f4986dd96b 10.15 landed
- 43b6f3ed8b13 11.10 landed