pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Erik Wasser <erik.wasser@iquer.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Are long term never commited SELECT statements are a problem?
Date: Thu, 21 Jul 2005 09:18:11 -0600
Message-ID: <20050721151811.GA513@winnie.fuhr.org> (raw)
In-Reply-To: <200507211557.58822.erik.wasser@iquer.net>
References: <200507211557.58822.erik.wasser@iquer.net>

On Thu, Jul 21, 2005 at 03:57:56PM +0200, Erik Wasser wrote:
> Now I've got here a blocking problem. Severel SQL statements (like 
> renaming a field or UPDATE of a field) are blocked until I kill a 
> certain task. This task DOES only the INSERTS and UPDATES with a 
> transaction and the SELECT statements are not within an transaction. 

If you set AutoCommit to 0 then all statements are inside a
transaction.  As you've discovered, SELECT acquires certain locks
that persist for the duration of the transaction, so you must commit
or roll back the transaction to release those locks (read up on
transaction theory to learn more about the rationale for this).

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



view thread (7+ messages)  latest in thread

Message-ID: <20050721151811.GA513@winnie.fuhr.org>
Permalink:  ../20050721151811.GA513@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050721151811.GA513@winnie.fuhr.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, erik.wasser@iquer.net
  Subject: Re: Are long term never commited SELECT statements are a problem?
  In-Reply-To: <20050721151811.GA513@winnie.fuhr.org>

* 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