Re: ACCESS EXCLUSIVE LOCK

From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ACCESS EXCLUSIVE LOCK
Date: 2006-03-02 14:19:51
Message-ID: slrne0dvo7.5md.andrew+nonews@atlantis.supernews.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On 2006-03-02, seth(dot)m(dot)green(at)gmail(dot)com <seth(dot)m(dot)green(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message seth.m.green 2006-03-02 14:30:19 Re: ACCESS EXCLUSIVE LOCK
Previous Message Martijn van Oosterhout 2006-03-02 14:19:46 Re: Automatic free space map filling

Browse pgsql-patches by date

  From Date Subject
Next Message seth.m.green 2006-03-02 14:30:19 Re: ACCESS EXCLUSIVE LOCK
Previous Message Hiroshi Saito 2006-03-02 14:18:33 Native-win32 patch