[postgis-devel] [raster] Testing out-db and regular blocking

Bborie Park dustymugs at gmail.com
Tue Feb 26 07:32:16 PST 2013


Ah.  I see what might be going on.  It looks like there's an error
creating the implicit exclusion index for the
enforce_spatially_unique_rast constraint.  It looks like postgres
tries to create the exclusion index with the same name as the
constraint, but fails as it already exists...

NOTICE:  ALTER TABLE / ADD EXCLUDE will create implicit index
"enforce_spatially_unique_rast" for table "indb"
...
NOTICE:  Returned error message: relation
"enforce_spatially_unique_rast" already exists

Confirmed using a simplified test case.  I wonder if this is the
expected behavior in PostgreSQL.

{{{
CREATE TABLE foo AS
	SELECT
		id
	FROM generate_series(1, 5) t(id);
CREATE TABLE bar AS
	SELECT
		id
	FROM generate_series(1, 5) t(id);
ALTER TABLE foo
	ADD CONSTRAINT enforce_unique_id EXCLUDE (id WITH =);
ALTER TABLE bar
	ADD CONSTRAINT enforce_unique_id EXCLUDE (id WITH =);
}}}

-bborie

On Tue, Feb 26, 2013 at 6:47 AM, Bborie Park <dustymugs at gmail.com> wrote:
> Hey Mateusz,
>
> Which version of PostGIS are you running?  The constraint should be
> the same regardless of where the data is store.  But, does the account
> running the postgres server have access to the out-db raster?
>
> -bborie
>
> On Tue, Feb 26, 2013 at 5:46 AM, Mateusz Loskot <mateusz at loskot.net> wrote:
>> Hi,
>>
>> I'm running a simple test:
>> - single GeoTIFF, 512x256 pixels, RGB
>> - loaded as single image, no cutting into tiles
>>
>> I noticed, these two commands set different regular_blocking constraint:
>>
>> raster2pgsql     -C -r  -> TRUE
>> raster2pgsql -R -C -r  -> FALSE
>>
>> Why is that?
>> Shouldn't the second command set it TRUE too?
>>
>> Here complete story [1]: Bash script loading the raster, raster_columns view
>> screenshot linked, gdalinfo output.
>>
>> [1] https://gist.github.com/mloskot/5038101
>>
>> Best regards,
>> --
>> Mateusz Loskot, http://mateusz.loskot.net
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list