Commit 29c3e2d
committed
Collect built-in LWLock tranche names statically, not dynamically.
There is little point in using the LWLockRegisterTranche mechanism for
built-in tranche names. It wastes cycles, it creates opportunities for
bugs (since failing to register a tranche name is a very hard-to-detect
problem), and the lack of any centralized list of names encourages
sloppy nonconformity in name choices. Moreover, since we have a
centralized list of the tranches anyway in enum BuiltinTrancheIds, we're
certainly not buying any flexibility in return for these disadvantages.
Hence, nuke all the backend-internal LWLockRegisterTranche calls,
and instead provide a const array of the builtin tranche names.
(I have in mind to change a bunch of these names shortly, but this
patch is just about getting them into one place.)
Discussion: https://postgr.es/m/9056.1589419765@sss.pgh.pa.us1 parent 07451e1 commit 29c3e2d
File tree
7 files changed
+168
-110
lines changed- src/backend
- access/transam
- replication
- logical
- storage
- buffer
- ipc
- lmgr
7 files changed
+168
-110
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | 238 | | |
242 | 239 | | |
243 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5116 | 5116 | | |
5117 | 5117 | | |
5118 | 5118 | | |
5119 | | - | |
| 5119 | + | |
5120 | 5120 | | |
5121 | | - | |
5122 | | - | |
5123 | 5121 | | |
5124 | 5122 | | |
5125 | 5123 | | |
| |||
5155 | 5153 | | |
5156 | 5154 | | |
5157 | 5155 | | |
5158 | | - | |
5159 | 5156 | | |
5160 | 5157 | | |
5161 | 5158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | 520 | | |
524 | 521 | | |
525 | 522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | 143 | | |
147 | 144 | | |
148 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 90 | | |
94 | 91 | | |
95 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | 270 | | |
273 | 271 | | |
274 | 272 | | |
| |||
0 commit comments