BUG #9148: generate invalid index (create index CONCURRENTLY ... )

Started by Nonameabout 12 years ago2 messagesbugs
Jump to latest
#1Noname
tiyukeji@126.com

The following bug has been logged on the website:

Bug reference: 9148
Logged by: tanhongwei(谭洪伟)
Email address: tiyukeji@126.com
PostgreSQL version: 9.1.9
Operating system: Debian GNU/Linux 6.0
Description:

eg :

canceling sql :
CREATE INDEX CONCURRENTLY t_1_index
ON t_1 USING btree
(name);

result:
index t_1_index exist, but size 0

note:
select * from pg_index
where indisvalid <> true
result :
have record.

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: BUG #9148: generate invalid index (create index CONCURRENTLY ... )

tiyukeji@126.com writes:

canceling sql :
CREATE INDEX CONCURRENTLY t_1_index
ON t_1 USING btree
(name);

result:
index t_1_index exist, but size 0

This is expected when using CREATE INDEX CONCURRENTLY. See the
notes at
http://www.postgresql.org/docs/9.3/static/sql-createindex.html#SQL-CREATEINDEX-CONCURRENTLY
which say
"If a problem arises while scanning the table ... the CREATE INDEX command
will fail but leave behind an "invalid" index."

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs