forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit401bd99
Support custom wait events for wait event type "Extension"
Two backend routines are added to allow extension to allocate and definecustom wait events, all of these being allocated in the type"Extension":* WaitEventExtensionNew(), that allocates a wait event ID computed froma counter in shared memory.* WaitEventExtensionRegisterName(), to associate a custom string to thewait event ID allocated.Note that this includes an example of how to use this new facility inworker_spi with tests in TAP for various scenarios, and somedocumentation about how to use them.Any code in the tree that currently uses WAIT_EVENT_EXTENSION couldswitch to this new facility to define custom wait events. This is leftas work for future patches.Author: Masahiro IkedaReviewed-by: Andres Freund, Michael Paquier, Tristan Partin, BharathRupireddyDiscussion:https://postgr.es/m/b9f5411acda0cf15c8fbb767702ff43e@oss.nttdata.com1 parent736ef50 commit401bd99
File tree
11 files changed
+393
-23
lines changed- doc/src/sgml
- src
- backend
- storage/ipc
- utils/activity
- include/utils
- test/modules/worker_spi
- t
- tools/pgindent
11 files changed
+393
-23
lines changedLines changed: 7 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1117 | 1117 |
| |
1118 | 1118 |
| |
1119 | 1119 |
| |
1120 |
| - | |
1121 |
| - | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
1122 | 1124 |
| |
1123 |
| - | |
1124 |
| - | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
1125 | 1128 |
| |
1126 | 1129 |
| |
1127 | 1130 |
| |
|
Lines changed: 45 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3453 | 3453 |
| |
3454 | 3454 |
| |
3455 | 3455 |
| |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
| 3486 | + | |
| 3487 | + | |
| 3488 | + | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
| 3492 | + | |
| 3493 | + | |
| 3494 | + | |
| 3495 | + | |
| 3496 | + | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
3456 | 3501 |
| |
3457 | 3502 |
| |
3458 | 3503 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| 52 | + | |
52 | 53 |
| |
53 | 54 |
| |
54 | 55 |
| |
| |||
142 | 143 |
| |
143 | 144 |
| |
144 | 145 |
| |
| 146 | + | |
145 | 147 |
| |
146 | 148 |
| |
147 | 149 |
| |
| |||
301 | 303 |
| |
302 | 304 |
| |
303 | 305 |
| |
| 306 | + | |
304 | 307 |
| |
305 | 308 |
| |
306 | 309 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
133 | 133 |
| |
134 | 134 |
| |
135 | 135 |
| |
136 |
| - | |
137 |
| - | |
| 136 | + | |
| 137 | + | |
138 | 138 |
| |
139 |
| - | |
| 139 | + | |
| 140 | + | |
140 | 141 |
| |
141 | 142 |
| |
142 | 143 |
| |
|
Lines changed: 170 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
| 26 | + | |
25 | 27 |
| |
26 | 28 |
| |
| 29 | + | |
| 30 | + | |
27 | 31 |
| |
28 | 32 |
| |
29 | 33 |
| |
30 | 34 |
| |
31 | 35 |
| |
32 | 36 |
| |
33 |
| - | |
34 | 37 |
| |
35 | 38 |
| |
36 | 39 |
| |
| |||
42 | 45 |
| |
43 | 46 |
| |
44 | 47 |
| |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
45 | 211 |
| |
46 | 212 |
| |
47 | 213 |
| |
| |||
151 | 317 |
| |
152 | 318 |
| |
153 | 319 |
| |
| 320 | + | |
| 321 | + | |
| 322 | + | |
154 | 323 |
| |
155 | 324 |
| |
156 | 325 |
| |
| |||
172 | 341 |
| |
173 | 342 |
| |
174 | 343 |
| |
175 |
| - | |
176 |
| - | |
177 |
| - | |
178 |
| - | |
179 |
| - | |
180 |
| - | |
181 |
| - | |
182 | 344 |
| |
183 | 345 |
| |
184 | 346 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
264 |
| - | |
| 264 | + | |
265 | 265 |
| |
266 | 266 |
| |
267 | 267 |
| |
|
Lines changed: 26 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
41 | 67 |
| |
42 | 68 |
| |
43 | 69 |
| |
|
0 commit comments
Comments
(0)