I am running PostgreSQL 8.1.3 on Windows 2003 Server. I am trying to transfer the data from a table in db1on one machine to a table in db2 on a different machine. The table size is about 22Gb (about 280 million rows). I was trying to do it by generating a backup file of the table in db1 and restoring it to db2. First, I created a plain 22Gb SQL dump and tried inserting it via psql. After some time it failed with the following error: psql: ERROR: out of memory DETAIL: Failed on request of size 32. I tried creating a compressed backup file (about 800Mb) and restoring it using pg_restore but I got the following error: pg_restore: ERROR: out of memory DETAIL: Failed on request of size 32. CONTEXT: COPY lane_data, line 17345022: "<line of data goes here>" pg_restore: [archiver (db)] error returned by PQendcopy pg_restore: *** aborted because of error So it seems like I am getting the same error in both cases. What is the cause? How could I adjust the restoring process or database parameters to handle this transfer? Is there a better way to transfer this data? Thanks.