From: | "Sven Haag" <sven-haag(at)gmx(dot)de> |
---|---|
To: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Table lock while adding a column and clients are logged in |
Date: | 2011-04-02 10:13:39 |
Message-ID: | 20110402101339.125180@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
yes i saw that in the documentation too. i guess it doesn't matter what kind of lock level the odbc driver is using (row-lock)?
but how can it be, that in oracle and sqlserver this is not happening?
-------- Original-Nachricht --------
> Datum: Sat, 02 Apr 2011 11:38:29 +0200
> Von: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
> An: Sven Haag <sven-haag(at)gmx(dot)de>
> CC: pgsql-general(at)postgresql(dot)org
> Betreff: Re: [GENERAL] Table lock while adding a column and clients are logged in
> Le 02/04/2011 11:09, Sven Haag a écrit :
> > hello pg fans,
> >
> > we have an application that communicates via ODBC directly to the
> postgres database.
> >
> > if i'm trying to add an additional column to a table in pgadmin while
> clients are logged in, pgadmin hangs. only if all cients are logged out it
> returns to the normal state. according to our consultant of the application
> this behavior doesn't appear in oracle or sql-server.
> >
> > how can i avoid this?
> >
>
> When you add a new column to a table, the session needs an
> AccessExclusiveLock to this table, which means no one can have a lock on
> the object while you add the column. IOW, pgAdmin (and any other tool)
> will hang until no one works on the table. If it's a heavily used table,
> there's not much you can do about it, but wait.
>
>
> --
> Guillaume
> http://www.postgresql.fr
> http://dalibo.com
--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Kellerer | 2011-04-02 10:44:55 | Re: Table lock while adding a column and clients are logged in |
Previous Message | Guillaume Lelarge | 2011-04-02 09:38:29 | Re: Table lock while adding a column and clients are logged in |