Re: pg_upgrade: out of memory

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: deepak <deepak(dot)pn(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_upgrade: out of memory
Date: 2012-02-14 19:37:37
Message-ID: 20120214193737.GA32208@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 06, 2012 at 05:14:55PM -0500, deepak wrote:
> Hi!
>
> While running pg_upgrade, on one instance, it ran out of memory during the
> final stages of upgrade
> (just before it starts to "link" old database files to new ones).
>
>
> We are using Postgres 9.1.1, and I see that there were some fixes to pg_upgrade
> in 9.1.2, though
> it doesn't mention anything about memory issues as such.
>
> Wondering if anyone has run into a similar type of situation, and if so, how to
> solve it?
>
> Also, is it possible to recover the database once pg_upgrade aborts in this
> manner?
>
>
> Here's an excerpt from the log while running pg_upgrade:
> ...
> "bin/pg_ctl" -w -D "data" stop
> waiting for server to shut down....LOG: received smart shutdown request
> LOG: shutting down
> .......LOG: database system is shut down
> . done
> server stopped
> Restoring user relation files
> Restoring user relation files
> pg_upgrade: out of memory
>
> pg_upgrade: out of memory

Wow, that's pretty amazing. As the docs say, pg_upgrade doesn't modify
the old cluster so you should be fine in reverting to that.

As far as why it ran out of memory, I have no idea, and have never heard
of a report about that before. Can you run it in a debugger and get a
backtrace?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jay Levitt 2012-02-14 20:05:49 High checkpoint_segments
Previous Message Scott Marlowe 2012-02-14 19:12:11 Re: Database denormalization