pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: ALTER CONSTRAINT on a partitioned FK isn't working
Date: Mon, 7 Dec 2020 20:34:14 -0300
Message-ID: <20201207233414.GA24167@alvherre.pgsql> (raw)
In-Reply-To: <3144850.1607369633@sss.pgh.pa.us>

On 2020-Dec-07, Tom Lane wrote:

> then everything behaves as expected.  So something is broken
> about propagating deferred-ness to partition triggers in an
> ALTER CONSTRAINT.  Oddly, it *looks* like it worked if you
> examine the child tables with "\d+".  I surmise that ALTER CONSTRAINT
> fixes whatever catalog fields psql looks at, but there's some other
> fields that also need to be updated and aren't being.

Yeah, this query shows that the tgdeferrable and tginitdeferred columns
ought to be dropped:

select tgname, tgdeferrable, tginitdeferred from pg_trigger;

These are all 'true' when the constraint is created correctly, and false
when changed by ALTER CONSTRAINT.

Let me see about fixing that ...





view thread (8+ messages)  latest in thread

Message-ID: <20201207233414.GA24167@alvherre.pgsql>
Permalink:  ../20201207233414.GA24167@alvherre.pgsql/
Also on:    postgresql.org/message-id/20201207233414.GA24167@alvherre.pgsql

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
  Subject: Re: ALTER CONSTRAINT on a partitioned FK isn't working
  In-Reply-To: <20201207233414.GA24167@alvherre.pgsql>

* 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