Re: Table lock while adding a column and clients are logged in - Mailing list pgsql-general

From Sven Haag
Subject Re: Table lock while adding a column and clients are logged in
Date
Msg-id 20110403141359.221300@gmx.net
Whole thread Raw
In response to Re: Table lock while adding a column and clients are logged in  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: Table lock while adding a column and clients are logged in
List pgsql-general
-------- Original-Nachricht --------
> Datum: Sun, 03 Apr 2011 15:37:17 +0200
> Von: Thomas Kellerer <spam_eater@gmx.net>
> An: pgsql-general@postgresql.org
> Betreff: Re: [GENERAL] Table lock while adding a column and clients are logged in

> Alban Hertroys wrote on 03.04.2011 11:17:
> > On 2 Apr 2011, at 12:44, Thomas Kellerer wrote:
> >
> >> Even after a plain SELECT you should issue a COMMIT (or ROLLBACK)
> >> to end the transaction that was implicitely started with the
> >> SELECT.
> >
> > Sorry, but you're wrong about that. A statement that implicitly
> > starts a transaction also implicitly COMMITs it. Otherwise single
> > UPDATE and INSERT statements outside of transaction blocks would not
> > COMMIT, and they do.
>
> AFAIK this is only true if you are running in auto commit mode.
>
> If you have auto commit turned off, a SELECT statement will leave the
> current transaction as "IDLE in transaction" not "IDLE" which means it *will*
> hold a lock on the tables involved that will prevent an ALTER TABLE.
>
> Regards
> Thomas



hi thomas,

well, as we are using the default setting here (according to the manual this is ON) this shouldn't be the case?!

cheers sven


--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl

pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Table lock while adding a column and clients are logged in
Next
From: Thomas Kellerer
Date:
Subject: Re: Table lock while adding a column and clients are logged in