From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: ALTER TABLE validate foreign key dependency problem |
Date: | 2020-07-12 04:50:46 |
Message-ID: | CAApHDvrQ2UoEvxCb8-3G1xRXVbJp+qe5sfeUuKoSV+oVMXwJ4Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 9 Jul 2020 at 15:54, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> I think the fix is just to delay the foreign key validation when
> there's a rewrite pending until the rewrite is complete.
I looked over this again and only slightly reworded a comment. The
problem exists as far back as 9.5 so I've attached 3 patches that,
pending any objections, I plan to push about 24 hours from now.
> 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.
David
Attachment | Content-Type | Size |
---|---|---|
delay_altertable_foreignkey_validation_during_table_rewrite10_v2.patch | application/octet-stream | 6.4 KB |
delay_altertable_foreignkey_validation_during_table_rewrite95_v2.patch | application/octet-stream | 6.4 KB |
delay_altertable_foreignkey_validation_during_table_rewrite12_v2.patch | application/octet-stream | 6.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2020-07-12 05:26:22 | Re: Default setting for enable_hashagg_disk |
Previous Message | Tom Lane | 2020-07-12 04:37:08 | Re: Default setting for enable_hashagg_disk |