Re: BUG #15660: pg_dump memory leaks when dumping LOBs

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: iserbin(at)bostonsd(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15660: pg_dump memory leaks when dumping LOBs
Date: 2019-02-28 08:00:12
Message-ID: CAJrrPGc8O8KC39nFB7VOVKvwK9kNnnB_86Uxpu04yhg-8CFdsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Feb 27, 2019 at 10:58 PM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:

>
> Hello,
> One of our customers faced an unexpected behaviour when using pg_dump to
> export one of DBs - pg_dump consumed all the server memory and got
> terminated with following error:
>
> ....
> pg_dump: reading row security enabled for table "public.databasechangelog"
> pg_dump: reading policies for table "public.databasechangelog"
> pg_dump: reading row security enabled for table "public.OperationAudit"
> pg_dump: reading policies for table "public.OperationAudit"
> pg_dump: reading large objects
> pg_dump: [archiver (db)] query failed: out of memory for query result
> pg_dump: [archiver (db)] query was: SELECT oid, (SELECT rolname FROM
> pg_catalog.pg_roles WHERE oid = lomowner) AS rolname, lomacl FROM
> pg_largeobject_metadata
> ....
> Looking through the plan gave following:

Thanks for reporting the problem.

pg_dump process collects all the database objects first (tables, indexes
and etc)
and then it write them into the file/archive.

In your scenario, there are many large objects that are present which leads
to
allocate memory for the each object before it gets dumped leads to out of
memory.

currently I don't see any alternative to this problem other than excluding
the dump
and export them separately.

Regards,
Haribabu Kommi
Fujitsu Australia

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-02-28 08:42:19 BUG #15661: Error connecting to the server
Previous Message Amit Langote 2019-02-28 07:46:57 Re: BUG #15623: Inconsistent use of default for updatable view