pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: cache lookup failed for constraint when alter table referred by partition table
Date: Thu, 13 Sep 2018 12:47:08 -0400
Message-ID: <9521.1536857228@sss.pgh.pa.us> (raw)
In-Reply-To: <20180913163504.ecvozcnighb6cbxm@alvherre.pgsql>
References: <20180913163504.ecvozcnighb6cbxm@alvherre.pgsql>

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> That's the problem all right.  The solution is to drop all
> index/constraint objects together in one performMultipleDeletions()
> instead of performDeletion() one by one, as in the attached patch.

Looks reasonable as far as it goes.  Given that we no longer require
any of this:

-	 * Now we can drop the existing constraints and indexes --- constraints
-	 * first, since some of them might depend on the indexes.  In fact, we
-	 * have to delete FOREIGN KEY constraints before UNIQUE constraints, but
-	 * we already ordered the constraint list to ensure that would happen.

can we make any simplifications in earlier steps?  At the very least,
look for comments related to this assumption.

			regards, tom lane




view thread (8+ messages)  latest in thread

Message-ID: <9521.1536857228@sss.pgh.pa.us>
Permalink:  ../9521.1536857228@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9521.1536857228@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, pryzby@telsasoft.com, rajkumar.raghuwanshi@enterprisedb.com
  Subject: Re: cache lookup failed for constraint when alter table referred by partition table
  In-Reply-To: <9521.1536857228@sss.pgh.pa.us>
  References: <20180913163504.ecvozcnighb6cbxm@alvherre.pgsql> <9521.1536857228@sss.pgh.pa.us>

* 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