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