forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf98dbde
committed
Add "ABI_compatibility" regions to wait_event_names.txt
The current design behind the automatic generation of the C code anddocumentation related to wait events introduced infa88928 does notoffer a way to attach new wait events without breaking ABIcompatibility, as all the events are forcibly reordered for each sectionin the input file wait_event_names.txt. Adding new wait events tostable branches is something that has happened in the past,0b6517abeing a recent example of that with VERSION_FILE_SYNC, so we need a wayto generate any C code for wait events while maintaining compatibilityon stable branches already released.This commit solves this issue by adding a new region called"ABI_compatibility" (keyword could be updated to something else ifsomeone had a better idea) to each section of wait_event_names.txt, soas one can add new wait events to stable branches inwait_event_names.txt while keeping the code ABI-compatible."ABI_compatibility" has no impact on the documentation generated: allthe wait events of one section are still alphabetically ordered. LWLockand Lock sections generate their C code elsewhere, so they do not needan "ABI_compatibility" region.For example, let's imagine a wait_event_names.txt like that:Section: ClassName - FooFOO_1"Waiting in Foo 1"FOO_2"Waiting in Foo 2"ABI_compatibility:NEW_FOO_1"Waiting in New Foo 1"NEW_BAR_1"Waiting in New Bar 1"This results in the following enum, where the events in the ABI regionare listed last with the same ordering as in wait_event_names.txt:typedef enum{ WAIT_EVENT_FOO_1, WAIT_EVENT_FOO_2, WAIT_EVENT_NEW_FOO_1, WAIT_EVENT_NEW_BAR_1} WaitEventFoo;New wait events added in stable branches should be added at the end ofeach ABI_compatibility region, and ABI_compatibility should remain emptyon HEAD and unreleased stable branches.This design has been suggested by Noah Misch and me.Reported-by: Noah MischAuthor: Bertrand DrouvotReviewed-by: Michael PaquierDiscussion:https://postgr.es/m/20240317183114.16@rfd.leadboat.com1 parente2a2357 commitf98dbde
File tree
2 files changed
+45
-1
lines changed- src/backend/utils/activity
2 files changed
+45
-1
lines changedLines changed: 27 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
| 41 | + | |
41 | 42 |
| |
| 43 | + | |
42 | 44 |
| |
43 | 45 |
| |
44 | 46 |
| |
| |||
59 | 61 |
| |
60 | 62 |
| |
61 | 63 |
| |
| 64 | + | |
62 | 65 |
| |
63 | 66 |
| |
64 | 67 |
| |
65 |
| - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
66 | 85 |
| |
67 | 86 |
| |
68 | 87 |
| |
69 | 88 |
| |
70 | 89 |
| |
71 | 90 |
| |
72 | 91 |
| |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
73 | 99 |
| |
74 | 100 |
| |
75 | 101 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
29 | 36 |
| |
30 | 37 |
| |
31 | 38 |
| |
| |||
61 | 68 |
| |
62 | 69 |
| |
63 | 70 |
| |
| 71 | + | |
64 | 72 |
| |
65 | 73 |
| |
66 | 74 |
| |
| |||
83 | 91 |
| |
84 | 92 |
| |
85 | 93 |
| |
| 94 | + | |
86 | 95 |
| |
87 | 96 |
| |
88 | 97 |
| |
| |||
150 | 159 |
| |
151 | 160 |
| |
152 | 161 |
| |
| 162 | + | |
153 | 163 |
| |
154 | 164 |
| |
155 | 165 |
| |
| |||
170 | 180 |
| |
171 | 181 |
| |
172 | 182 |
| |
| 183 | + | |
173 | 184 |
| |
174 | 185 |
| |
175 | 186 |
| |
| |||
257 | 268 |
| |
258 | 269 |
| |
259 | 270 |
| |
| 271 | + | |
260 | 272 |
| |
261 | 273 |
| |
262 | 274 |
| |
| |||
266 | 278 |
| |
267 | 279 |
| |
268 | 280 |
| |
| 281 | + | |
269 | 282 |
| |
270 | 283 |
| |
271 | 284 |
| |
| |||
275 | 288 |
| |
276 | 289 |
| |
277 | 290 |
| |
| 291 | + | |
| 292 | + | |
278 | 293 |
| |
279 | 294 |
| |
280 | 295 |
| |
| |||
379 | 394 |
| |
380 | 395 |
| |
381 | 396 |
| |
| 397 | + | |
382 | 398 |
| |
383 | 399 |
| |
384 | 400 |
| |
| |||
401 | 417 |
| |
402 | 418 |
| |
403 | 419 |
| |
| 420 | + | |
| 421 | + |
0 commit comments
Comments
(0)