Re: Good name for new lock type for VACUUM?

From: Thomas Swan <tswan(at)olemiss(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Good name for new lock type for VACUUM?
Date: 2001-06-21 23:40:16
Message-ID: 3B3285E0.20505@olemiss.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>Awhile ago I said that I wanted to create a new flavor of table-level
>lock for concurrent VACUUM to get on a table. RowExclusiveLock is
>not the right thing because it is not self-exclusive, whereas we don't
>want more than one VACUUM mangling a table at a time. But anything
>higher locks out concurrent writers, which we don't want either.
>So we need an intermediate lock type that will conflict with itself
>as well as with ShareLock and above. (It must conflict with ShareLock
>since we don't want new indexes being created during VACUUM either...)
>
*snip*

>
>BTW, I'm assuming that I should make the new lock type available
>at the user level as a LOCK TABLE option. Any objections to that?
>
I think that type of lock would best be kept to the system level.

*thinking out loud*
If your goal is to have it used more often, then user level might
provide more opportunities for testing. However, I can't really think
of any situation where it would be beneficial to a user. The rest of
the locks seem to take care of everything else.

Is it going to timeout? If a connection is dropped by a user, will the
lock release?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-06-22 00:10:14 Re: Re: Good name for new lock type for VACUUM?
Previous Message Nathan Myers 2001-06-21 23:03:17 Re: Backup and Recovery