Re: shared Locks

From: Daniel Schuchardt <daniel_schuchardt(at)web(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: shared Locks
Date: 2005-09-20 10:01:46
Message-ID: dgomm9$3eg$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout schrieb:

>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?
>
>
Yes you'r right here. Because we use Cursor Fetch, every statement
starts a transaction. So your right I tested it and this forces a table
lock. Hm... i will look how to do this in another way.

thnx,
Daniel

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-09-20 10:32:24 Re: shared Locks
Previous Message Martijn van Oosterhout 2005-09-20 09:33:47 Re: shared Locks