Re: Foreign keys and partitioned tables

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Foreign keys and partitioned tables
Date: 2018-01-25 14:35:26
Message-ID: CA+TgmoYmLJWOS+BLjE+9AQx2xjS-nAXtT5WwgKqPMEJtMZ5Fqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 31, 2017 at 2:43 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> This patch removes all the ONLY markers from queries in ri_triggers.c.
> That makes the queries work for the new use case, but I haven't figured
> if it breaks things for other use cases. I suppose not, since regular
> inheritance isn't supposed to allow foreign keys in the first place, but
> I haven't dug any further.

I suspect that this leads to bugs under concurrency, something to do
with crosscheck_snapshot, but I couldn't say exactly what the problem
is off the top of my head. My hope is that partitioning might be
immune on the strength of knowing that any given tuple could only be
present in one particular partition, but that might be wishful
thinking.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-01-25 14:37:26 Re: reducing isolation tests runtime
Previous Message Stephen Frost 2018-01-25 14:33:38 Re: [HACKERS] Add support for tuple routing to foreign partitions