Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VBQvd-00008T-94 for pgsql-admin@arkaria.postgresql.org; Mon, 19 Aug 2013 14:59:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VBQvb-0007jf-SN for pgsql-admin@arkaria.postgresql.org; Mon, 19 Aug 2013 14:59:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VBQvN-0007Nk-BH for pgsql-admin@postgresql.org; Mon, 19 Aug 2013 14:59:17 +0000 Received: from uvena.de ([2001:4d88:1ffc:463::5]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VBQvK-0007cg-Oy for pgsql-admin@postgresql.org; Mon, 19 Aug 2013 14:59:16 +0000 Received: from [10.164.1.157] (unknown [62.214.71.244]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by uvena.de (Postfix) with ESMTPSA id 1470BC00C1 for ; Mon, 19 Aug 2013 14:59:12 +0000 (UTC) Message-ID: <521232C2.1060801@frank.uvena.de> Date: Mon, 19 Aug 2013 16:59:14 +0200 From: Frank Lanitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130704 Icedove/17.0.7 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: postgres crashes on insert in 40 different threads References: In-Reply-To: X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -4.7 (----) 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 Am 19.08.2013 10:07, schrieb Dzmitry: > I am doing a lot of writes to DB in 40 different threads – so every > thread check if record exists – if not => insert record, if exists => > update record. > During this update, my disk IO almost always – 100% and sometimes it > crash my DB with following message: Is this really needed to have so many threads and chances for race conditions? Beside the mention RAM thing you box might have to low IO capacities for this kind of trnasactions. What is the load and in detail the iowait saying? Cheers, Frank -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin