From: | Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | negative bitmapset member not allowed Error with partition pruning |
Date: | 2018-07-26 10:10:01 |
Message-ID: | CAKcux6k=udMa_oOXnbHduBwvJ8SnUaQxRLPA=D2+ryYoyT6eeA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I am getting "ERROR: negative bitmapset member not allowed" when
enable_partition_pruning set to true with below test case.
[edb(at)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
From | Date | Subject | |
---|---|---|---|
Next Message | Imai, Yoshikazu | 2018-07-26 10:30:51 | RE: Locking B-tree leafs immediately in exclusive mode |
Previous Message | Bertrand DROUVOT | 2018-07-26 10:05:33 | Re: [Proposal] Add accumulated statistics for wait event |