This page provides the information for restoring the CSS2 base if you are getting "out of memory" in the restore log.
Below is the error from the restore log:
pg_restore: creating INDEX idx_dssposobj
pg_restore: [archiver (db)] Error from TOC entry 98590; 1259912714 INDEX idx_dssposobj operator
pg_restore: [archiver (db)] could not execute query: ERROR: out of memory
DETAIL: Failed on request of size 100663296.
Command was: CREATE INDEX idx_dssposobj ON dss_positions USING btree (objectid);
pg_restore: creating INDEX idx_dssposprop
pg_restore: [archiver (db)] Error from TOC entry 98591; 1259912715 INDEX idx_dssposprop operator
pg_restore: [archiver (db)] could not execute query: ERROR: out of memory
DETAIL: Failed on request of size 100663296.
Command was: CREATE INDEX idx_dssposprop ON dss_positions USING btree (propertyid);
Release | Yes/No |
---|---|
8.3.x |
RDBMS | Yes/No |
---|---|
CSS |
While restoring a big data base from pgAdmin, if you are getting the above error in the log the issue is because of available memory.
So in order to successfully restore the base you need to
Reduce the memory of the sql session, for this run the below command in the sql session.
set maintenance_work_mem = 262144
Query result exampleCREATE INDEX idx_dssposobj ON dss_positions USING btree (objectid);
CREATE INDEX idx_dssposprop ON dss_positions USING btree (propertyid);
- Run the failed command from the restoration log manually in sql session to successfully restore the base.