I am getting the following error when trying to import a raster image to a PostGIS DB using raster2pgsql.

ERROR: current transaction is aborted, commands ignored until end of transaction block

I have tried a number of different solutions without any luck.

OS is Windows 10 PostgreSQL version 12

This is my command

raster2pgsql -s 32735 -I -C -M C:\Users\jaunv\Dropbox\share2server\postgis\2020-09-26-00_00_2020-09-26-23_59_Sentinel-2_L2A_Moisture_index.tiff -F -t 250x250 public.raster | psql -d geofarm -U postgres -p 5432
1

There are 1 best solutions below

1
On BEST ANSWER

try to run without -C constraints

and with -e for executing without transaction

Does table public.raster exist and has any data?

also for clean experiment it is better to insert into empty table

https://helpmanual.io/help/raster2pgsql/