Re: Fwd: restoring table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: sharilalipv <sharilalipv(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Fwd: restoring table
Date: 2014-01-02 14:22:23
Message-ID: 27168.1388672543@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

sharilalipv <sharilalipv(at)gmail(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kido Kouassi 2014-01-02 16:04:08 PostgreSQL 9.3 PITR from remote server failing
Previous Message sharilalipv 2014-01-02 07:35:55 Re: Fwd: restoring table