pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: sharilalipv <sharilalipv@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Fwd: restoring table
Date: Thu, 02 Jan 2014 09:22:23 -0500
Message-ID: <27168.1388672543@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+i1o4ZhN1=mS8D29EGDGc=PeprGFqeBzDUb8bvuWa--gy-+Og@mail.gmail.com>
References: <CA+i1o4ZDnbXmqvGnWbWByY24=t6jT1DhAf9XeOyEQT3jsjip1Q@mail.gmail.com>
	<CA+i1o4ZhN1=mS8D29EGDGc=PeprGFqeBzDUb8bvuWa--gy-+Og@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

sharilalipv <sharilalipv@gmail.com> writes:
> I could not  restore a table (4.1GB) in postgresql database server.

> 2014-01-01 18:12:31 IST LOG:  server process (PID 60667) was terminated by
> signal 9: Killed

OOM killer at work, evidently.  You should consider adjusting your kernel
settings to prevent memory overcommit.  However, for this particular case
that might not do much beyond allowing a more graceful failure.  I'm going
to guess that the reason the backend process is eating memory is that
there's a foreign key constraint on the table, or some other reason to
fire AFTER triggers for it, so that the trigger event list is getting big.
You would be best off dropping the foreign key(s) and then recreating them
after you've loaded the data --- this will likely be faster overall, as
well as less prone to memory bloat.

This advice as well as other useful info can be found at
http://www.postgresql.org/docs/9.3/static/populate.html

			regards, tom lane


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (6+ messages)  latest in thread

Message-ID: <27168.1388672543@sss.pgh.pa.us>
Permalink:  ../27168.1388672543@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27168.1388672543@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sharilalipv@gmail.com
  Subject: Re: Fwd: restoring table
  In-Reply-To: <27168.1388672543@sss.pgh.pa.us>

* 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