Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 4E9291337BBB for ; Fri, 18 Mar 2011 13:07:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 57317-03 for ; Fri, 18 Mar 2011 16:07:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id BCF4E133616B for ; Fri, 18 Mar 2011 13:07:01 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Fri, 18 Mar 2011 11:07:01 -0500 Message-Id: <4D833CCD020000250003BAAB@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Fri, 18 Mar 2011 11:06:53 -0500 From: "Kevin Grittner" To: Cc: Subject: Re: Help: massive parallel update to the same table References: <4D833C26020000250003BAA8@gw.wicourts.gov> <4D833CCD020000250003BAAB@gw.wicourts.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/222 X-Sequence-Number: 42901 [rearranged - please don't top-post] [also, bringing this back to the list - please keep the list copied] Red Maple wrote: > Kevin Grittner wrote: >> It should be parallel by default. Are you taking out any >> explicit locks? > my clients use psql to remotely run an update function on the > postgres server. Each client run its own psql to connect to the > server. What I have noticed is that if I commented out the update > in the function so that only query is being done then all the core > would kick in and run at 100%. However if I allow the update on > the function then only one core would run. > Currently it take 40min to update all the client statistics Please show us the part you commented out to get the faster run time, and the source code for the function you mentioned. > Do you know if I have configured something incorrectly? > > I am running postgres 9.0.2 on fedora core 14. Here is my > postgres.conf file > > > [over 500 lines of configuration, mostly comments, wrapped] If you're going to post that, please strip the comments or post the results of this query: http://wiki.postgresql.org/wiki/Server_Configuration I don't think anything in your configuration will affect this particular problem, but it seems likely that you could do some overall tuning. If you want to do that, you should probably start a new thread after this issue is sorted out. -Kevin