Is there any pattern behind the naming conventions of PostgreSQL Table-Level Locks?
-1
votes
1
answer
79
views
I know that PostgreSQL has 8 level of table locks which are, from least restrictive to most:
1. ACCESS SHARE
2. ROW SHARE
3. ROW EXCLUSIVE
4. SHARE UPDATE EXCLUSIVE
5. SHARE
6. SHARE ROW EXCLUSIVE
7. EXCLUSIVE
8. ACCESS EXCLUSIVE
However, I can't really determine any pattern or convention to these names. There are literally 5 words total: ACCESS, SHARE, ROW, EXCLUSIVE, and UPDATE, which are grouped together, seemingly at random, for all 8 levels. I find myself preferring to refer to them as just L1 through L8 rather than their actual names.
Are these names just the result of historical conventions that evolved organically in a way which doesn't really have any meaning besides "look at the docs and see what level each is?"
Asked by DaleSwanson
(113 rep)
Dec 7, 2022, 01:18 AM
Last activity: Dec 7, 2022, 08:33 AM
Last activity: Dec 7, 2022, 08:33 AM