Re: ACCESS EXCLUSIVE LOCK - Mailing list pgsql-hackers

From Andrew - Supernews
Subject Re: ACCESS EXCLUSIVE LOCK
Date
Msg-id slrne0dvo7.5md.andrew+nonews@atlantis.supernews.net
Whole thread Raw
In response to ACCESS EXCLUSIVE LOCK  (seth.m.green@gmail.com)
Responses Re: ACCESS EXCLUSIVE LOCK
List pgsql-hackers
On 2006-03-02, seth.m.green@gmail.com <seth.m.green@gmail.com> wrote:
>> TRUNCATE is another command that takes an access exclusive lock.
>
> The whole SP takes about 10 seconds to run total.  The TRUNCATE command
> only takes less than a second.  However, the access exclusive lock is
> held throughout the entire SP, not just during the execution of the
> TRUNCATE command. Shouldn't TRUNCATE be releasing the lock as soon as
> it finishes?

No, locks are always held until the end of the transaction.

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Automatic free space map filling
Next
From: Tom Lane
Date:
Subject: Re: [SQL] Interval subtracting