Re: relation ### modified while in use - Mailing list pgsql-hackers

From Alex Pilosov
Subject Re: relation ### modified while in use
Date
Msg-id Pine.BSO.4.10.10010230115280.22422-100000@spider.pilosoft.com
Whole thread Raw
In response to Re: relation ### modified while in use  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: relation ### modified while in use  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 23 Oct 2000, Tom Lane wrote:

>     begin;
>     select * from foo;  -- gets AccessShareLock
>     LOCK TABLE foo;        -- gets AccessExclusiveLock
>     ...
>     end;
> 
> this will work currently because the SELECT releases AccessShareLock
> when done, but it will deadlock if SELECT does not release that lock.
Probably a silly question, but since this is the same transaction,
couldn't the lock be 'upgraded' without a problem? 

Or postgres doesn't currently have idea of lock upgrades...?

-alex





pgsql-hackers by date:

Previous
From: Alex Pilosov
Date:
Subject: Re: relation ### modified while in use
Next
From: Tom Lane
Date:
Subject: Re: relation ### modified while in use