Thread: BUG #9148: generate invalid index (create index CONCURRENTLY ... )
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.
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