Hi, I am getting "ERROR: negative bitmapset member not allowed" when enable_partition_pruning set to true with below test case.
[edb@localhost bin]$ ./psql postgres psql (12devel) Type "help" for help. postgres=# SET enable_partition_pruning TO on; SET postgres=# CREATE TABLE part (a INT, b INT) PARTITION BY LIST(a); CREATE TABLE postgres=# CREATE TABLE part_p1 PARTITION OF part FOR VALUES IN (-2,-1,0,1,2); CREATE TABLE postgres=# CREATE TABLE part_p2 PARTITION OF part DEFAULT PARTITION BY RANGE(a); CREATE TABLE postgres=# CREATE TABLE part_p2_p1 PARTITION OF part_p2 DEFAULT; CREATE TABLE postgres=# INSERT INTO part VALUES (-1,-1),(1,1),(2,NULL),(NULL,-2),(NULL,NULL); INSERT 0 5 postgres=# EXPLAIN (COSTS OFF) *postgres-# SELECT tableoid::regclass as part, a, b FROM part WHERE a IS NULL ORDER BY 1, 2, 3;ERROR: negative bitmapset member not allowed* postgres=# SET enable_partition_pruning TO off; SET postgres=# EXPLAIN (COSTS OFF) SELECT tableoid::regclass as part, a, b FROM part WHERE a IS NULL ORDER BY 1, 2, 3; QUERY PLAN ------------------------------------------------------------------------ Sort Sort Key: ((part_p1.tableoid)::regclass), part_p1.a, part_p1.b -> Append -> Seq Scan on part_p1 Filter: (a IS NULL) -> Seq Scan on part_p2_p1 Filter: (a IS NULL) (7 rows) postgres=# Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation