Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id C41C61337B6C for ; Mon, 18 Oct 2010 12:02:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 44189-01-3 for ; Mon, 18 Oct 2010 15:02:23 +0000 (UTC) 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 F03181337BD2 for ; Mon, 18 Oct 2010 12:02:15 -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 o9IF2FIr019783; Mon, 18 Oct 2010 11:02:15 -0400 (EDT) To: Mladen Gogala cc: Eric Comeau , "pgsql-performance@postgresql.org" Subject: Re: Help with duration of statement: EXECUTE [PREPARE: COMMIT] In-reply-to: <4CBC58CD.9010906@vmsinfo.com> References: <18890.1287411233@sss.pgh.pa.us> <4CBC58CD.9010906@vmsinfo.com> Comments: In-reply-to Mladen Gogala message dated "Mon, 18 Oct 2010 10:25:17 -0400" Date: Mon, 18 Oct 2010 11:02:15 -0400 Message-ID: <19782.1287414135@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/291 X-Sequence-Number: 40709 Mladen Gogala writes: > Tom Lane wrote: >> My guess would be overstressed disk subsystem. A COMMIT doesn't require >> much except fsync'ing the commit WAL record down to disk ... > Doesn't the "commit" statement also release all the locks held by the > transaction? Yeah, and there's a nontrivial amount of other cleanup too, but it all amounts to just changes in in-memory data structures. I don't see that taking five seconds, especially not if commits of similar transactions usually take much less than that. regards, tom lane