Re: partitioned tables referenced by FKs

From: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: partitioned tables referenced by FKs
Date: 2019-03-26 13:13:51
Message-ID: 99634a29-4227-d029-ea0d-72d4c76663ac@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Amit,

On 3/26/19 2:06 AM, Amit Langote wrote:
> Wouldn't you get the same numbers on HEAD too? IOW, I'm not sure how the
> patch here, which seems mostly about getting DDL in order to support
> foreign keys on partitioned tables, would have affected the result of this
> benchmark. Can you clarify your intention of running this benchmark
> against these patches?
>

Yeah, you are right. As I'm also seeing this issue with a test case of

-- ddl.sql --
CREATE TABLE t1 (i1 INT PRIMARY KEY, i2 INT NOT NULL) PARTITION BY HASH
(i1);
CREATE TABLE t2 (i1 INT PRIMARY KEY, i2 INT NOT NULL);

\o /dev/null
SELECT 'CREATE TABLE t1_p' || x::text || ' PARTITION OF t1
FOR VALUES WITH (MODULUS 64, REMAINDER ' || x::text || ');'
from generate_series(0,63) x;
\gexec
\o

ALTER TABLE t1 ADD CONSTRAINT fk_t1_i2_t2_i1 FOREIGN KEY (i2) REFERENCES
t2(i1);

ANALYZE;

we shouldn't focus on it in this thread.

Best regards,
Jesper

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2019-03-26 13:18:53 Re: Improvement of installation document
Previous Message Ila B. 2019-03-26 13:09:43 [GSoC 2019] Proposal: Develop Performance Farm Database and Website