Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id CEDCB632AAE for ; Mon, 23 Mar 2009 16:58:40 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 09122-06 for ; Mon, 23 Mar 2009 16:58:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 264DC6329A9 for ; Mon, 23 Mar 2009 16:58:39 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n2NJwTdF001282; Mon, 23 Mar 2009 15:58:29 -0400 (EDT) To: Brian Cox cc: "pgsql-performance@postgresql.org" Subject: Re: multiple threads inserting into the same table In-reply-to: <49C7E42B.9070002@ca.com> References: <49C7E42B.9070002@ca.com> Comments: In-reply-to Brian Cox message dated "Mon, 23 Mar 2009 12:34:03 -0700" Date: Mon, 23 Mar 2009 15:58:29 -0400 Message-ID: <1281.1237838309@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL=0.010 X-Spam-Level: X-Archive-Number: 200903/334 X-Sequence-Number: 33256 Brian Cox writes: > The application log shows that 99652 rows are being inserted into > relation ts_stats_transet_user_daily. 5 threads are doing the inserts. pg_stat_activity says those five threads are doing nothing except sitting around with open transactions. You sure you don't have a bug on the application side? regards, tom lane