Re: Good name for new lock type for VACUUM? - Mailing list pgsql-hackers

From Thomas Swan
Subject Re: Good name for new lock type for VACUUM?
Date
Msg-id 3B3285E0.20505@olemiss.edu
Whole thread Raw
In response to Good name for new lock type for VACUUM?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: Good name for new lock type for VACUUM?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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?




pgsql-hackers by date:

Previous
From: ncm@zembu.com (Nathan Myers)
Date:
Subject: Re: Backup and Recovery
Next
From: Tom Lane
Date:
Subject: Re: Re: Good name for new lock type for VACUUM?