From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Bug in get_partition_for_tuple |
Date: | 2017-03-10 02:56:45 |
Message-ID: | d64f8498-70eb-3c88-b56d-c54fd3b0500f@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Just observed a crash due to thinko in the logic that handles NULL
partition key. Absence of null-accepting partition in this case should
have caused an error, instead the current code proceeds with comparison
resulting in crash.
create table p (a int, b char) partition by list (b);
create table p1 partition of p for values in ('a');
insert into p values (1); -- crashes
Attached patch fixes that and adds a test.
Thanks,
Amit
Attachment | Content-Type | Size |
---|---|---|
0001-Fix-a-bug-in-get_partition_for_tuple.patch | text/x-diff | 3.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2017-03-10 03:04:46 | Re: amcheck (B-Tree integrity checking tool) |
Previous Message | Peter Geoghegan | 2017-03-10 02:54:19 | Re: on_dsm_detach() callback and parallel tuplesort BufFile resource management |