|From:||Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>|
|To:||Dmitry Ivanov <d(dot)ivanov(at)postgrespro(dot)ru>|
|Cc:||Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Erik Rijkers <er(at)xs4all(dot)nl>, Amit Langote <amitlangote09(at)gmail(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org|
|Subject:||Re: Declarative partitioning - another take|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On 2016/12/13 2:45, Dmitry Ivanov wrote:
> Huh, this code is broken as well. We have to ignore partitions that don't
> have any subpartitions. Patch is attached below (v2).
Good catch and thanks a lot for the patch! I have revised it a bit and
added some explanatory comments to that function.
Attaching the above patch, along with some other patches posted earlier,
and one more patch fixing another bug I found. Patch descriptions follow:
Fixes some obsolete comments while improving others. Also, implements
some of Tomas Vondra's review comments.
Fixes inconsistencies and improves some examples in the documentation.
Also, mentions the limitation regarding row movement.
Fixes a bug reported by Tomas, whereby a parent's relcache was not
invalidated after creation of a new partition using CREATE TABLE PARTITION
OF. This resulted in tuple-routing code not being to able to find a
partition that was created by the last command in a given transaction.
Fixes a bug I found this morning, whereby an internal partition's
constraint would not be enforced if it is targeted directly. See example
create table p (a int, b char) partition by range (a);
create table p1 partition of p for values from (1) to (10) partition by
create table p1a partition of p1 for values in ('a');
insert into p1 values (0, 'a'); -- should fail, but doesn't
Fixes a bug discovered by Dmitry Ivanov, whereby wrong indexes were
assigned to the partitions of lower levels (level > 1), causing spurious
"partition not found" error as demonstrated in his email .
Sorry about sending some of these patches repeatedly though.
|Next Message||amul sul||2016-12-13 07:55:24||Re: pg_background contrib module proposal|
|Previous Message||Dilip Kumar||2016-12-13 06:36:33||Re: Parallel bitmap heap scan|