forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6e71dd7
committed
Modify tqueue infrastructure to support transient record types.
Commit4a4e689, which introduced thismechanism, failed to account for the fact that the RECORD pseudo-typeuses transient typmods that are only meaningful within a singlebackend. Transferring such tuples without modification between twocooperating backends does not work. This commit installs a systemfor passing the tuple descriptors over the same shm_mq being used tosend the tuples themselves. The two sides might not assign the sametransient typmod to any given tuple descriptor, so we must alsosubstitute the appropriate receiver-side typmod for the one used bythe sender. That adds some CPU overhead, but still seems better thanbeing unable to pass records between cooperating parallel processes.Along the way, move the logic for handling multiple tuple queues fromtqueue.c to nodeGather.c; tqueue.c now provides a TupleQueueReader,which reads from a single queue, rather than a TupleQueueFunnel, whichpotentially reads from multiple queues. This change was suggestedpreviously as a way to make sure that nodeGather.c rather than tqueue.chad policy control over the order in which to read from queues, butit wasn't clear to me until now how good an idea it was. typmodmapping needs to be performed separately for each queue, and it ismuch simpler if the tqueue.c code handles that and leaves multiplexingmultiple queues to higher layers of the stack.1 parentcbb82e3 commit6e71dd7
File tree
5 files changed
+986
-153
lines changed- src
- backend/executor
- include
- executor
- nodes
- tools/pgindent
5 files changed
+986
-153
lines changedLines changed: 108 additions & 30 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
| 39 | + | |
39 | 40 |
| |
40 | 41 |
| |
41 | 42 |
| |
42 | 43 |
| |
43 | 44 |
| |
| 45 | + | |
44 | 46 |
| |
45 | 47 |
| |
46 | 48 |
| |
| |||
125 | 127 |
| |
126 | 128 |
| |
127 | 129 |
| |
| 130 | + | |
128 | 131 |
| |
129 | 132 |
| |
130 | 133 |
| |
| |||
148 | 151 |
| |
149 | 152 |
| |
150 | 153 |
| |
| 154 | + | |
151 | 155 |
| |
152 | 156 |
| |
153 | 157 |
| |
| |||
160 | 164 |
| |
161 | 165 |
| |
162 | 166 |
| |
163 |
| - | |
| 167 | + | |
| 168 | + | |
164 | 169 |
| |
165 |
| - | |
166 |
| - | |
167 |
| - | |
| 170 | + | |
| 171 | + | |
168 | 172 |
| |
169 |
| - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
170 | 178 |
| |
| 179 | + | |
| 180 | + | |
| 181 | + | |
171 | 182 |
| |
172 |
| - | |
173 |
| - | |
174 |
| - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
175 | 187 |
| |
176 | 188 |
| |
177 | 189 |
| |
| |||
182 | 194 |
| |
183 | 195 |
| |
184 | 196 |
| |
185 |
| - | |
| 197 | + | |
186 | 198 |
| |
187 | 199 |
| |
188 | 200 |
| |
| |||
254 | 266 |
| |
255 | 267 |
| |
256 | 268 |
| |
257 |
| - | |
258 |
| - | |
259 |
| - | |
260 |
| - | |
261 |
| - | |
262 |
| - | |
263 |
| - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
264 | 272 |
| |
265 | 273 |
| |
266 | 274 |
| |
| |||
270 | 278 |
| |
271 | 279 |
| |
272 | 280 |
| |
273 |
| - | |
| 281 | + | |
274 | 282 |
| |
275 |
| - | |
| 283 | + | |
276 | 284 |
| |
277 |
| - | |
278 |
| - | |
279 |
| - | |
280 |
| - | |
281 |
| - | |
282 |
| - | |
283 |
| - | |
284 |
| - | |
| 285 | + | |
285 | 286 |
| |
286 | 287 |
| |
287 | 288 |
| |
| |||
309 | 310 |
| |
310 | 311 |
| |
311 | 312 |
| |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
312 | 387 |
| |
313 | 388 |
| |
314 | 389 |
| |
| |||
320 | 395 |
| |
321 | 396 |
| |
322 | 397 |
| |
323 |
| - | |
324 |
| - | |
| 398 | + | |
| 399 | + | |
325 | 400 |
| |
326 |
| - | |
327 |
| - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
328 | 406 |
| |
329 | 407 |
| |
330 | 408 |
| |
|
0 commit comments
Comments
(0)