Re: Bug in detaching a partition with a foreign key.
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Álvaro Herrera <alvherre@alvh.no-ip.org>
To: Sami Imseih <samimseih@gmail.com>
Cc: Amul Sul <sulamul@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-01-20T15:26:35Z
Lists: pgsql-hackers
On 2025-Jan-20, Sami Imseih wrote: > Below is the repro I used. Similar as you original repro, > but without subpartition on foo_p0. This also results in the segfault > with your attached patch. I think the issue in Amul's patch is just that the list was not initialized to NIL. Other than the lack of comments, which I'm in the process of writing, the initial patch Amul submitted seems largely correct to me, in my understanding of the situation. I'll throw in a few tests, hoping that it'll prove correct, and if so then I'll get it pushed soon. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "El hombre nunca sabe de lo que es capaz hasta que lo intenta" (C. Dickens)
Commits
-
Fix detach of a partition that has a toplevel FK to a partitioned table
- ddab512ebb97 16.7 landed
- 9b21f203dd87 18.0 landed
- 2f30847d1d04 17.3 landed
- 1bc092519b77 15.11 landed