PG_dump a large database fails

From: fida aljounaidi <fida(dot)aljounaidi(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: PG_dump a large database fails
Date: 2010-06-03 08:49:07
Message-ID: AANLkTilFaE9yK2VlWJR6Bb8CDZi8Au0lb6KKNADrbDwY@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi

For migration purpose (from 8.2 to 8.4), i'm trying to make a dump of a 16
GB database.
(this is my dump command "pg_dump mydb | gzip > /var/dump/db.gz"

It fails whith this error message:
pg_dump: la commande SQL a échoué
pg_dump: Message d'erreur du serveur : ERREUR: invalid memory alloc request
size 1510382321
pg_dump: La commande était : COPY public.attach_data (id, thedata) TO
stdout;

i executed this command to wich row exceed this size,
SELECT id, octet_length(thedata) as taille FROM attach_data WHERE
octet_length(thedata)>1510382321 ORDER BY 2 DESC;
id | taille
----+--------
(0 ligne)

Here we can see that there is no row greater than 1510382321

but i found rows exceeding 440 MB. i deleted them.

Now the dump stopped with the same error but with a different size

pg_dump: la commande SQL a échoué
pg_dump: Message d'erreur du serveur : ERREUR: invalid memory alloc request
size 1146242327
pg_dump: La commande était : COPY public.attach_data (id, thedata) TO
stdout;

Can you give me some advices on how can i do the dump ?

Thanks a lot

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Shoaib Mir 2010-06-03 09:15:46 Re: graceful reload
Previous Message Vasiliy G Tolstov 2010-06-03 08:01:14 Re: graceful reload