Re: shared Locks - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: shared Locks
Date
Msg-id 20050920093343.GB8586@svana.org
Whole thread Raw
In response to shared Locks  (Daniel Schuchardt <daniel_schuchardt@web.de>)
Responses Re: shared Locks
List pgsql-general
On Tue, Sep 20, 2005 at 11:18:48AM +0200, Daniel Schuchardt wrote:
> So if we want to change a table structure (add a field or sth like this)
> many clients own AccessShareLock's because it seams that a simple SELECT
> * FROM table will grant a AccessShareLock and don't release it unitl the
> connection is terminated. Is that true? Is it is possible to release
> this lock without a disconnect? {Problem is that about 30 users has to
> disconnect sometimes. :-( }

I think you'll find that locks are held to the end of the transaction.
You're not holding a transaction open but not doing anything, are you?

Otherwise, provide an example including output of pg_locks.

Hope this helps,

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Daniel Schuchardt
Date:
Subject: Re: Blob data type and it's efficiency on PostgreSQL
Next
From: Daniel Schuchardt
Date:
Subject: Re: shared Locks