Re: shared Locks

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Daniel Schuchardt <daniel_schuchardt(at)web(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: shared Locks
Date: 2005-09-20 09:33:47
Message-ID: 20050920093343.GB8586@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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.

In response to

  • shared Locks at 2005-09-20 09:18:48 from Daniel Schuchardt

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Schuchardt 2005-09-20 10:01:46 Re: shared Locks
Previous Message Daniel Schuchardt 2005-09-20 09:27:36 Re: Blob data type and it's efficiency on PostgreSQL