Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VyjAO-0001l4-Te for pgsql-admin@arkaria.postgresql.org; Thu, 02 Jan 2014 14:22:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VyjAO-0000Wq-1T for pgsql-admin@arkaria.postgresql.org; Thu, 02 Jan 2014 14:22:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VyjAN-0000Wj-1Q for pgsql-admin@postgresql.org; Thu, 02 Jan 2014 14:22:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VyjAI-0006hF-Hl for pgsql-admin@postgresql.org; Thu, 02 Jan 2014 14:22:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s02EMNpZ027169; Thu, 2 Jan 2014 09:22:23 -0500 From: Tom Lane To: sharilalipv cc: pgsql-admin@postgresql.org Subject: Re: Fwd: restoring table In-reply-to: References: Comments: In-reply-to sharilalipv message dated "Thu, 02 Jan 2014 12:22:49 +0530" Date: Thu, 02 Jan 2014 09:22:23 -0500 Message-ID: <27168.1388672543@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org sharilalipv 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