pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Emanuel Araújo <eacshm@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: disable and enable trigger all when a foreign keys
Date: Mon, 15 Jul 2019 12:09:26 -0400
Message-ID: <20190715160926.GA17140@alvherre.pgsql> (raw)
In-Reply-To: <28189.1562942593@sss.pgh.pa.us>

On 2019-Jul-12, Tom Lane wrote:

> The OP already found the best method to get out of this, which is to
> drop and re-add the FK constraint.  Adding the constraint will force
> a full verification scan, which is what you need here since there's
> no information available about which checks were missed.

Maybe it would make sense to be able to mark the FK as not validated, so
that you can apply ALTER CONSTRAINT ... VALIDATE.  Seems better than
DROP + ADD.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (6+ messages)  latest in thread

Message-ID: <20190715160926.GA17140@alvherre.pgsql>
Permalink:  ../20190715160926.GA17140@alvherre.pgsql/
Also on:    postgresql.org/message-id/20190715160926.GA17140@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 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-general@postgresql.org
  Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com, eacshm@gmail.com
  Subject: Re: disable and enable trigger all when a foreign keys
  In-Reply-To: <20190715160926.GA17140@alvherre.pgsql>
  References: <28189.1562942593@sss.pgh.pa.us> <20190715160926.GA17140@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