1. WKTRaster Configuration Run ./configure --help and check 3 options: --enable-rtapi-debug Defines POSTGIS_RASTER_API_DEBUG, turns on debugging of RASTER core API --enable-rtpg-debug Defines POSTGIS_RASTER_PG_DEBUG, turns on debugging of PostGIS RASTER activity --enable-rtpgmem-debug Defines POSTGIS_RASTER_PG_DEBUG_MEM, turns on debugging PostGIS RASTER memory activity. Simply, overrides de-/allocators with custom calls to help tracking memory usage. 2. Execution export PGHOST=$PWD/tmp /usr/lib/postgresql/8.3/bin/postgres --single -k $PGHOST < test.sql psql