Good name for new lock type for VACUUM?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Good name for new lock type for VACUUM?
Date: 2001-06-21 21:15:25
Message-ID: 22697.993158125@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mikheev, Vadim 2001-06-21 21:26:09 RE: Good name for new lock type for VACUUM?
Previous Message Olivier PRENANT 2001-06-21 20:32:13 psql+openssl+uniware7