pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Álvaro Herrera <alvherre@alvh.no-ip.org>
To: Amul Sul <sulamul@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Re: Allow NOT VALID foreign key constraints on partitioned tables.
Date: Sat, 25 Jan 2025 07:00:01 +0200
Message-ID: <c599253c-1ccd-4161-80fc-c9065e037a09@gmail.com> (raw)
In-Reply-To: <202501231504.4kgstjs6b7ae@alvherre.pgsql>
References: <202501231504.4kgstjs6b7ae@alvherre.pgsql>

Hello Álvaro,

23.01.2025 17:04, Álvaro Herrera wrote:
> OK thanks, looks good, I have pushed it now with some trivial
> amendments.

Please look at the script that produces an error starting from b663b9436:
CREATE TABLE st (a int, primary key (a));
CREATE TABLE pt (a int,
   FOREIGN KEY (a) REFERENCES st ON DELETE SET NULL ON UPDATE SET NULL,
   FOREIGN KEY (a) REFERENCES st ON DELETE SET NULL ON UPDATE SET NULL
) PARTITION BY LIST (a);
CREATE TABLE tp1 PARTITION OF pt FOR VALUES IN (1, 2);
ALTER TABLE pt DETACH PARTITION tp1;
ALTER TABLE pt ATTACH PARTITION tp1 FOR VALUES IN (1, 2);

ERROR:  XX000: tuple already updated by self
LOCATION:  simple_heap_update, heapam.c:4374

Best regards,
Alexander Lakhin
Neon (https://neon.tech)





view thread (14+ messages)  latest in thread

Message-ID: <c599253c-1ccd-4161-80fc-c9065e037a09@gmail.com>
Permalink:  ../c599253c-1ccd-4161-80fc-c9065e037a09@gmail.com/
Also on:    postgresql.org/message-id/c599253c-1ccd-4161-80fc-c9065e037a09@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: exclusion@gmail.com, alvherre@alvh.no-ip.org, sulamul@gmail.com
  Subject: Re: Allow NOT VALID foreign key constraints on partitioned tables.
  In-Reply-To: <c599253c-1ccd-4161-80fc-c9065e037a09@gmail.com>
  References: <202501231504.4kgstjs6b7ae@alvherre.pgsql> <c599253c-1ccd-4161-80fc-c9065e037a09@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox