Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables
От | Robert Haas |
---|---|
Тема | Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables |
Дата | |
Msg-id | CA+TgmoZEUonD9dUZH1FBEyq=PEv_KvE3wC=A=0zm-_tRz_917A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>) |
Ответы |
Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables
Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables |
Список | pgsql-hackers |
On Tue, Sep 5, 2017 at 7:01 AM, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote: > accumulate_append_subpath() is executed for every path instead of > every relation, so changing it would collect the same list multiple > times. Instead, I found the old way of associating all intermediate > partitions with the root partitioned relation work better. Here's the > updated patch set. When I tried out patch 0001, it crashed repeatedly during 'make check' because of an assertion failure in get_partitioned_child_rels. It seemed to me that the way the patch was refactoring expand_inherited_rtentry involved more code rearrangement than necessary, so I reverted all the code rearrangement and just kept the functional changes, and all the crashes went away. (That refactoring also failed to initialize has_child properly.) In so doing, I reintroduced the problem that the PartitionedChildRelInfo lists weren't getting set up correctly, but after some thought I realized that was just because expand_single_inheritance_child() was choosing between adding an RTE and adding the OID to partitioned_child_rels, whereas for an intermediate partitioned table it needs to do both. So I inserted a trivial fix for that problem (replacing "else" with a new "if"-test), basically: - else + + if (childrte->relkind == RELKIND_PARTITIONED_TABLE) Please check out the attached version of the patch. In addition to the above simplifications, I did some adjustments to the comments in various places - some just grammar and others a bit more substantive. And I think I broke a long line in one place, too. One thing I notice is that if I rip out the changes to initsplan.c, the new regression test still passes. If it's possible to write a test that fails without those changes, I think it would be a good idea to include one in the patch. That's certainly one of the subtler parts of this patch, IMHO. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Вложения
В списке pgsql-hackers по дате отправления: