Re: pg_restore out of memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Miguel Ramos <org(dot)postgresql(at)miguel(dot)ramos(dot)name>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_restore out of memory
Date: 2016-07-12 15:58:13
Message-ID: 24152.1468339093@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Miguel Ramos <org(dot)postgresql(at)miguel(dot)ramos(dot)name> writes:
> s 15:40 de 12-07-2016, Tom Lane escreveu:
>> Unless you're running pg_restore under a really small ulimit, this would
>> seem to suggest some kind of memory leak in pg_restore itself. I wonder
>> how many objects in your dump (how long is "pg_restore -l" output)?

> pg_restore -l | wc gives me:
> 1055 7984 70675

> It looks small to me.

Yeah, the archive TOC is clearly not large enough to cause any problem in
itself. I'm wondering at this point about libpq buffer bloat. We've
fixed a number of problems in that area over the last few years, though
in a quick review of the commit logs I don't see anything that clearly
bears on your problem. (Commit 86888054a92aeca4 is pretty interesting
but applies to mostly-server-to-client data transfer, which is the wrong
direction.) I wonder whether your data is such that loading it would
trigger a bunch of NOTICEs from the server?

Anyway, it would be useful to try running the restore with a more modern
version of pg_restore, to see if that helps.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ansley Peduru 2016-07-12 16:44:58 using CRL(s) with multiple CA(s) issued by different root CA(s)
Previous Message Miguel Ramos 2016-07-12 15:33:00 Re: pg_restore out of memory