Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UNdUt-0003KD-U0 for pgsql-admin@arkaria.postgresql.org; Thu, 04 Apr 2013 06:18:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UNdUt-0006tu-7a for pgsql-admin@arkaria.postgresql.org; Thu, 04 Apr 2013 06:18:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UNdUs-0006to-AU for pgsql-admin@postgresql.org; Thu, 04 Apr 2013 06:18:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UNdUm-00046J-C2 for pgsql-admin@postgresql.org; Thu, 04 Apr 2013 06:18:05 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r346HwkS006147; Thu, 4 Apr 2013 02:17:58 -0400 (EDT) From: Tom Lane To: Bert cc: "pgsql-admin@postgresql.org" Subject: Re: slave restarts with kill -9 coming from somewhere, or nowhere In-reply-to: References: <5382.1364925968@sss.pgh.pa.us> Comments: In-reply-to Bert message dated "Thu, 04 Apr 2013 08:02:04 +0200" Date: Thu, 04 Apr 2013 02:17:58 -0400 Message-ID: <6146.1365056278@sss.pgh.pa.us> X-Pg-Spam-Score: -4.3 (----) 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 Bert writes: > These are my memory settings: > work_mem = 4GB > How is it possible that one connection (query) uses all the ram? And how > can I avoid it? Uh ... don't do the above. work_mem is the allowed memory consumption per query step, ie per hash or sort operation. A complex query can easily use multiples of work_mem. 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