I need to get the footprint (not the extent) 10GB raster in PostGIS similar to this question (but it's a very old question without any proper answer). So far the best approach I have come up with is
WRITE TABLE myschema.mypolygon AS
SELECT
ST_DumpAsPolygons(ST_Reclass(rast,
'(0-100):1',
'16BUI', -9999))
FROM
myschema.myraster;
This basically changes all the raster values to 1 (I know the range is well within 0-100) and then passes this raster over to ST_DumpAsPolygons which will create polygons based on raster values.
I am wondering if there is a faster and more efficient way of doing this?