Re: BUG #18628: Race condition during attach/detach partition breaks constraints of partition having foreign key - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #18628: Race condition during attach/detach partition breaks constraints of partition having foreign key
Date
Msg-id 202409241123.dnrn6pdmoud6@alvherre.pgsql
Whole thread Raw
In response to Re: BUG #18628: Race condition during attach/detach partition breaks constraints of partition having foreign key  (Alexander Lakhin <exclusion@gmail.com>)
Responses Re: BUG #18628: Race condition during attach/detach partition breaks constraints of partition having foreign key
List pgsql-bugs
On 2024-Sep-24, Alexander Lakhin wrote:

> I'm sorry,  I' was too hasty to untangle those queries. Now I see that
> this error can be produced with this serial script:
> [...]

I suspect this is the same problem that was reported by Jehan-Guillaume
de Rorthais, for which there are two patches proposed, his and mine:

[1] https://postgr.es/m/202408072250.2c4fkhwf56lk@alvherre.pgsql
[2] https://postgr.es/m/20240905005728.0836d609@karst

I haven't looked at his patch, but I suspect it's better than mine on
maintainability grounds.  I think his code causes more catalog churn,
though perhaps we don't care too much about that in this particular
case.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/



pgsql-bugs by date:

Previous
From: Tender Wang
Date:
Subject: Re: BUG #18628: Race condition during attach/detach partition breaks constraints of partition having foreign key
Next
From: Alexander Lakhin
Date:
Subject: Re: BUG #18628: Race condition during attach/detach partition breaks constraints of partition having foreign key