Re: ALTER TABLE validate foreign key dependency problem

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: ALTER TABLE validate foreign key dependency problem
Date: 2020-07-12 20:12:52
Message-ID: CANP8+jLnW8LQEC7CyE1kWQpc7=a=cr-9w1jmCWB0PkY1QOVk1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 12 Jul 2020 at 05:51, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:

> > I also considered that we could just delay all foreign key validations
> > until phase 3, but I ended up just doing then only when a rewrite is
> > pending.
>
> I still wonder if it's best to delay the validation of the foreign key
> regardless of if there's a pending table rewrite, but the patch as it
> is now only delays if there's a pending rewrite.
>

Consistency seems the better choice, so I agree we should validate later in
all cases. Does changing that have any other effects?

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
Mission Critical Databases

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2020-07-12 20:30:47 Re: Parallel grouping sets
Previous Message Daniel Gustafsson 2020-07-12 20:04:21 Re: should INSERT SELECT use a BulkInsertState?