Re: Our naming of wait events is a disaster.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Cc: Isaac Morland <isaac.morland@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
Robert Haas <robertmhaas@gmail.com>
Date: 2020-05-14T20:27:14Z
Lists: pgsql-hackers
Attachments
- rename-async-SLRU-to-Notify.patch (text/x-diff) patch
I wrote: > Digging through the existing callers of SimpleLruInit, we have > name control lock subdir > "async" AsyncCtlLock "pg_notify" > "clog" CLogControlLock "pg_xact" > "commit_timestamp" CommitTsControlLock "pg_commit_ts" > "multixact_member" MultiXactMemberControlLock "pg_multixact/members" > "multixact_offset" MultiXactOffsetControlLock "pg_multixact/offsets" > "oldserxid" OldSerXidLock "pg_serial" > "subtrans" SubtransControlLock "pg_subtrans" > After studying that list for awhile, it seems to me that we could > do worse than to name the SLRUs to match their on-disk subdirectories, > which are names that are already user-visible. So I propose these > base names for the SLRUs: > Notify > Xact > CommitTs > MultiXactMember (or MultiXactMembers) > MultiXactOffset (or MultiXactOffsets) > Serial > Subtrans As POC for this, here's a draft patch to rename the "async" SLRU and associated locks. If people are good with this then I'll go through and do similarly for the other SLRUs. A case could be made for doing s/async/notify/ more widely in async.c; for instance it's odd that the struct protected by NotifyQueueLock didn't get renamed to NotifyQueueControl. But that seems a bit out of scope for the immediate problem, and anyway I'm not sure how far to take it. I don't really want to rename async.c's externally-visible functions, for instance. For the moment I just renamed symbols used in the SimpleLruInit() call. regards, tom lane
Commits
-
Mop-up for wait event naming issues.
- 3048898e73c7 13.0 landed
-
Change locktype "speculative token" to "spectoken".
- 474e7da64856 13.0 landed
-
Drop the redundant "Lock" suffix from LWLock wait event names.
- 14a910109126 13.0 landed
-
Rename assorted LWLock tranches.
- 36ac359d3621 13.0 landed
-
Rename SLRU structures and associated LWLocks.
- 5da14938f7bf 13.0 landed
-
Collect built-in LWLock tranche names statically, not dynamically.
- 29c3e2dd5a6a 13.0 landed