pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Mario Splivalo <mario.splivalo@megafon.hr>
To: pgsql-admin@postgresql.org
Subject: Re: COMMIT takes long time for read only transaction
Date: Thu, 26 May 2011 14:50:04 -0500
Message-ID: <4DDE689C020000250003DDA0@gw.wicourts.gov> (raw)
In-Reply-To: <4DDE99B1.6010402@megafon.hr>
References: <4DDE99B1.6010402@megafon.hr>

Mario Splivalo <mario.splivalo@megafon.hr> wrote:
 
> 2011-05-26 18:25:51.624 CEST [16163] <ample@knjiz>
> [192.168.1.5(32431)] 
> COMMIT LOG:  duration: 11159.202 ms  statement: COMMIT
> 2011-05-26 18:26:05.788 CEST [16163] <ample@knjiz>
> [192.168.1.5(32431)] 
> COMMIT LOG:  duration: 326.856 ms  statement: COMMIT
> 
> This is a grep from a postgres log when I had logging of all
> statements enabled. I did grep by the local pid (16163), and what
> I don't understand is:
> - why is first COMMIT taking 11 seconds, when there are only
> SELECTs in the transaction? SELECTS don't call any user defined
> functions, just plain reads from the tables.
> - what is that second COMMIT? If I issue COMMIT without 'BEGIN' 
> shouldn't I get: "COMMIT WARNING:  there is no transaction in
> progress"
 
Hard to say what's going on without knowing more about your logging
configuration.  If you run this query and post the results it will
help clarify the situation:
 
http://wiki.postgresql.org/wiki/Server_Configuration
 
-Kevin



view thread (2+ messages)

Message-ID: <4DDE689C020000250003DDA0@gw.wicourts.gov>
Permalink:  ../4DDE689C020000250003DDA0@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4DDE689C020000250003DDA0@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, mario.splivalo@megafon.hr
  Subject: Re: COMMIT takes long time for read only transaction
  In-Reply-To: <4DDE689C020000250003DDA0@gw.wicourts.gov>
  References: <4DDE99B1.6010402@megafon.hr> <4DDE689C020000250003DDA0@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox