From: digoal@126.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14155: bloom index error with unlogged table
Date: Tue, 24 May 2016 14:41:46 +0000
Message-ID: <20160524144146.22598.42558@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14155
Logged by: Zhou Digoal
Email address: digoal@126.com
PostgreSQL version: 9.6beta1
Operating system: CentOS 6.x x64
Description:
postgres=# create table u_tbl (id int);
CREATE TABLE
postgres=# create index idx_u_tbl on u_tbl using bloom (id);
ERROR: access method "bloom" does not exist
postgres=# create extension bloom;
CREATE EXTENSION
postgres=# create index idx_u_tbl on u_tbl using bloom (id);
CREATE INDEX
postgres=# insert into u_tbl values (1);
INSERT 0 1
postgres=# insert into u_tbl values (2);
INSERT 0 1
postgres=# insert into u_tbl select generate_series(1,100000);
INSERT 0 100000
postgres=# explain select * from u_tbl where id=1;
QUERY PLAN
-----------------------------------------------------------------------------------
Gather (cost=0.00..0.00 rows=0 width=0)
Workers Planned: 1
Single Copy: true
-> Bitmap Heap Scan on u_tbl (cost=1045.38..1397.44 rows=565 width=4)
Recheck Cond: (id = 1)
-> Bitmap Index Scan on idx_u_tbl (cost=0.00..1045.24 rows=565
width=0)
Index Cond: (id = 1)
(7 rows)
postgres=# select * from u_tbl where id=1;
id
----
1
1
(2 rows)
postgres=# drop table u_tbl ;
DROP TABLE
postgres=# create unlogged table u_tbl (id int);
CREATE TABLE
postgres=# create index idx_u_tbl on u_tbl using bloom (id);
ERROR: index "idx_u_tbl" already contains data
postgres=# \set VERBOSITY verbose
postgres=# create index idx_u_tbl on u_tbl using bloom (id);
ERROR: XX000: index "idx_u_tbl" already contains data
LOCATION: blbuildempty, blinsert.c:164
postgres=# drop table u_tbl ;
DROP TABLE
postgres=# create temp table u_tbl (id int);
CREATE TABLE
postgres=# create index idx_u_tbl on u_tbl using bloom (id);
CREATE INDEX
postgres=# insert into u_tbl select generate_series(1,100000);
INSERT 0 100000
postgres=# explain select * from u_tbl where id=1;
QUERY PLAN
-----------------------------------------------------------------------------
Bitmap Heap Scan on u_tbl (cost=1045.38..1397.44 rows=565 width=4)
Recheck Cond: (id = 1)
-> Bitmap Index Scan on idx_u_tbl (cost=0.00..1045.24 rows=565
width=0)
Index Cond: (id = 1)
(4 rows)
postgres=# select * from u_tbl where id=1;
id
----
1
(1 row)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: digoal@126.com
Subject: Re: BUG #14155: bloom index error with unlogged table
In-Reply-To: <20160524144146.22598.42558@wrigleys.postgresql.org>
References: <20160524144146.22598.42558@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox