Re: Cannot dump foreign key constraints on partitioned table - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Cannot dump foreign key constraints on partitioned table
Date
Msg-id 20180713045027.GC23895@paquier.xyz
Whole thread Raw
In response to Re: Cannot dump foreign key constraints on partitioned table  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Cannot dump foreign key constraints on partitioned table  (amul sul <sulamul@gmail.com>)
List pgsql-hackers
On Thu, Jul 12, 2018 at 11:34:43PM -0400, Alvaro Herrera wrote:
> I'm not sure what to *do* with the partition, though :-) I don't think
> there's a nice way to verify that the FK actually exists, or that
> catalog rows are set in such-and-such way, after restoring this.
> The pg_restore tests are marked TODO in the suite.  I think that'll have
> to wait.

Ouch, right.  My eyes are betraying me.  I swear when I tested that I
saw an ALTER TABLE ADD CONSTRAINT command generated as well for each
partition on top of the parent :)

But only the parent needs to have the definition, so your test is
sufficient.  Sorry for the noise.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Checkpoint not retrying failed fsync?
Next
From: Thomas Munro
Date:
Subject: Re: file cloning in pg_upgrade and CREATE DATABASE