I'm trying to dissolve boundaries of a table of polygons which are ST_Buffers of 5km radius and dump them into another table. The first table contains around 10 million polygons. The table that contains the polygon is:
CREATE TABLE poly_5km(gid serial PRIMARY KEY, bufferType varchar, the_geog geography(POLYGON,4326) );
Here's the table that I want to create:
CREATE TABLE buffer_5km(gid serial PRIMARY KEY, bufferType varchar, the_geog geography(POLYGON,4326) );
INSERT INTO buffer_5km(gid,bufferType,the_geog) VALUES (1,'test',(SELECT (ST_Dump(ST_Multi(ST_Union(ST_MakeValid(poly_5km.the_geog::geometry))))).geom::geography FROM poly_5km WHERE poly_5km.bufferType= 'test'));
But whenever I run the insert statement, I'm getting this error:
ERROR: array size exceeds the maximum allowed (1073741823)
Can anyone tell me what I'm doing wrong ?
You are trying to store more than 1GB long value. PostgreSQL objects has 1GB limits - you cannot to change it. This limit is same on 32 or 64bit platforms. So you have to change algorithm or granularity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With