From: Adrien Nayrat <adrien.nayrat@anayrat.info>
To: pgsql-general@lists.postgresql.org
Subject: Re: pg_dump out of memory for large table with LOB
Date: Sun, 11 Nov 2018 11:14:44 +0100
Message-ID: <73d2f4fb-3da4-1c09-8bff-88a35f16bcd2@anayrat.info> (raw)
In-Reply-To: <8FC5F25FF3EC4744ADFCF20CBA3F44BE016811BCEF@SRV-CAMTL-EXCH2.Forensictech.com>
References: <8FC5F25FF3EC4744ADFCF20CBA3F44BE016811BCEF@SRV-CAMTL-EXCH2.Forensictech.com>
Hello,
On 11/10/18 12:49 AM, Jean-Marc Lessard wrote:
> The dumped table is 0.5TB, 17 million rows and LOB uses about 99% of the space.
>
If I understand, you have 17 million Large Object?
I do not recall exactly and maybe I am wrong. But it seems pg_dump has to
allocate memory for each object to dump :
addBoundaryDependencies:
for (i = 0; i < numObjs; i++)
[...]
case DO_BLOB_DATA:
/* Data objects: must come between the boundaries */
addObjectDependency(dobj, preDataBound->dumpId);
addObjectDependency(postDataBound, dobj->dumpId);
break;
addObjectDependency:
[...]
pg_malloc(dobj->allocDeps * sizeof(DumpId));
With 17 million LO, it could eat lot of memory ;)
Attachments:
signature.asc (application/pgp-signature, 487B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrien.nayrat@anayrat.info
Subject: Re: pg_dump out of memory for large table with LOB
In-Reply-To: <73d2f4fb-3da4-1c09-8bff-88a35f16bcd2@anayrat.info>
References: <8FC5F25FF3EC4744ADFCF20CBA3F44BE016811BCEF@SRV-CAMTL-EXCH2.Forensictech.com> <73d2f4fb-3da4-1c09-8bff-88a35f16bcd2@anayrat.info>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox