Hi, I got server crash due to assert failure at ATTACHing overlap rang partition, here is test case to reproduce this:
CREATE TABLE test_parent(a int) PARTITION BY RANGE (a); CREATE TABLE test_parent_part2 PARTITION OF test_parent FOR VALUES FROM(100) TO(200); CREATE TABLE test_parent_part1(a int NOT NULL); ALTER TABLE test_parent ATTACH PARTITION test_parent_part1 FOR VALUES FROM(1) TO(200); I think, this bug exists in the following code of check_new_partition_bound(): 767 if (equal || off1 != off2) 768 { 769 overlap = true; 770 with = boundinfo->indexes[off2 + 1]; 771 } When equal is true array index should not be 'off2 + 1'. While reading code related to this, I wondered why partition_bound_bsearch is not immediately returns when cmpval==0? Apologise if this has been already reported. Regards, Amul -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers