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...)

I'm having a hard time coming up with a name, though.  I originally
called it "VacuumLock" but naming it after its primary use seems bogus.
Some other possibilities that I don't much like either:

        SchemaLock      --- basically we're locking down the table schema
        WriteShareLock  --- sharing access with writers

Any better ideas out there?  Where did the existing lock type names
come from, anyway?  (Not SQL92 or SQL99, for sure.)

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?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to