PostgreSQL/PostGIS hangs while creating spatial index
I have a rather small table (262 rows) with POINT geometry for which I want to create a spatial index (The data I used you will find in the attached SQL file). When I try to create the spatial index on the geometry column the query will run and never end. To only way to cancel this query is to restart my computer (restarting just the PostgreSQL server won't work). If I delete just a single (arbitrary) row from this table and then run the "CREATE INDEX ..." statement the index is created within a few milliseconds. I currently have no idea what causes this behavior. I discovered the issue when I tried to restore data from a dump file and pg_restore would never finish. This happens with PostGIS 2.1 under Windows and Linux (64-Bit OS). I have not tested if this issue occurs also using PostGIS 2.0.
Many thanks,
Michael
Looks like a duplicate of #2449. This will need to be patch/released sooner than later if multiple people are hitting it.