[postgis-devel] CLUSTER in 8.3

Kevin Neufeld kneufeld at refractions.net
Thu Dec 4 13:51:56 PST 2008


Wow, that's bad.  I just updated to PostgreSQL 8.3.5 from 8.3.3 and I now get the same thing.

test=# create temp table tmp as select st_makepoint(random(), random()) as the_geom from generate_series(1, 10000);
SELECT
test=# create index tmp_geom_idx on tmp using gist (the_geom);
CREATE INDEX
test=# analyze tmp;
ANALYZE
test=# select count(*) from tmp;
  count
-------
  10000
(1 row)

test=# cluster tmp using tmp_geom_idx;
CLUSTER
test=# analyze tmp;
ANALYZE
test=# select count(*) from tmp;
  count
-------
      0
(1 row)

test=# select version();
                                               version
---------------------------------------------------------------------------------------------------
  PostgreSQL 8.3.5 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)
(1 row)

test=# select postgis_full_version();
                                                            postgis_full_version 

-------------------------------------------------------------------------------------------------------------------------------------------
  POSTGIS="1.4.0SVN" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.4.9, 29 Oct 2004" (procs from 1.4 USE_GEOS=1 USE_PROJ=1 
USE_STATS=1 need upgrade)
(1 row)

-- Kevin


Paul Ramsey wrote:
> Maybe I'm doing something wrong... here's a log of how I exercised this:
> 
> pramsey=# create table ttt as select * from counties;
> SELECT
> pramsey=# create index ttt_gix on ttt using gist(the_geom);
> CREATE INDEX
> pramsey=# clusture
> pramsey=# select count(*) from ttt;
>  count
> -------
>   3141
> (1 row)
> 
> pramsey=# cluster ttt using ttt_gix;
> CLUSTER
> pramsey=# select count(*) from ttt;
>  count
> -------
>      0
> (1 row)
> 
> pramsey=# select version();
>                                                            version
> ------------------------------------------------------------------------------------------------------------------------------
>  PostgreSQL 8.3.5 on i386-apple-darwin9.5.0, compiled by GCC
> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
> (1 row)
> 
> pramsey=# select postgis_full_version();
>                                 postgis_full_version
> -------------------------------------------------------------------------------------
>  POSTGIS="1.3.4SVN" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.6.0, 21 Dec
> 2007" USE_STATS
> (1 row)
> 
> pramsey=#
> 
> 
> On Wed, Dec 3, 2008 at 8:43 AM, Kevin Neufeld <kneufeld at refractions.net> wrote:
>> Is seems fine (for Points anyway) on my 8.3.3 install running on an old FC3
>> box.
>>
>> Did you run out of disk space?  Did the transaction get half way through and
>> was forced to stop?
>>
>> -- Kevin
>>
>> Paul Ramsey wrote:
>>> Is it just me, or has clustering on spatial indexes stopped working in
>>> 8.3? First, the syntax of CLUSTER has been changed, from "CLUSTER
>>> [index] ON [table]" to "CLUSTER [table] USING [index]". Second, when I
>>> run the new syntax using a gist index as the target, the index
>>> disappears and all row count drops to zero!
>>>
>>> P.
>>> _______________________________________________
>>> postgis-devel mailing list
>>> postgis-devel at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list