Re: partitioned tables referenced by FKs
Jesper Pedersen <jesper.pedersen@redhat.com>
From: Jesper Pedersen <jesper.pedersen@redhat.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>,
Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-03-26T13:13:51Z
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
Commits
-
Support foreign keys that reference partitioned tables
- f56f8f8da6af 12.0 landed
-
Fix partitioned index creation bug with dropped columns
- 7009f1a2df65 11.3 landed
- 126d63122232 12.0 landed
-
Improve psql's \d display of foreign key constraints
- 1af25ca0c2d9 12.0 cited
-
Fix dependency recording bug for partitioned PKs
- 7e7c57bbb2eb 12.0 landed
-
Add index_get_partition convenience function
- a6da0047158b 12.0 landed
-
Restore RI trigger sanity check
- 815b20ae0c6e 12.0 landed
- 04f9b449aa30 11.3 landed
-
Foreign keys on partitioned tables
- 3de241dba86f 11.0 cited