id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 3920,[raster] _add_raster_constraint_coverage_tile and memory issue with large tile coverage,mloskot,Bborie Park,"TL:TR: Export of large raster (eg. 230K x 210K pixel) as tile coverage with regular blocking fails during addition of constraints due to `invalid memory alloc request size 1932000000 (XX000)` The `_add_raster_constraint_coverage_tile` function blank raster with rasterised whole spatial extent of the tile coverage, that is a raster with dimensions of the whole coverage. That blank raster is used as RHS operand in `ST_IsCoverageTile`. The `_add_raster_constraint_coverage_tile` function sequence is `ST_AsRaster` followed by bands & data removal with `ST_MakeEmptyRaster`. The problem is, AFAIU, that `ST_AsRaster` already requires allocation of a huge raster for the whole tile coverage, that obviously fails. The following bands clean-up is really a cosmetic optimisation after the fact. Perhaps, a feasible solution would be to have internal `ST_AsRaster` that already creates a dummy band-less raster without attempt to allocate memory for data.",defect,closed,medium,PostGIS 3.1.0,raster,2.3.x,wontfix,tile coverage,