forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd951052
committed
Allow parallel workers to retrieve some data from Port
This commit moves authn_id into a new global structure calledClientConnectionInfo (mapping to a MyClientConnectionInfo for eachbackend) which is intended to hold all the client information thatshould be shared between the backend and any of its parallel workers,access for extensions and triggers being the primary use case. There isno need to push all the data of Port to the workers, and authn_id isquite a generic concept so using a separate structure provides the bestbalance (the name of the structure has been suggested by Robert Haas).While on it, and per discussion as this would be useful for a potentialSYSTEM_USER that can be accessed through parallel workers, a secondfield is added for the authentication method, copied directly fromPort.ClientConnectionInfo is serialized and restored using a new parallelkey and a structure tracks the length of the authn_id, making theaddition of more fields straight-forward.Author: Jacob ChampionReviewed-by: Bertrand Drouvot, Stephen Frost, Robert Haas, Tom Lane,Michael Paquier, Julien RouhaudDiscussion:https://postgr.es/m/793d990837ae5c06a558d58d62de9378ab525d83.camel@vmware.com1 parent421892a commitd951052
File tree
7 files changed
+163
-24
lines changed- src
- backend
- access/transam
- libpq
- postmaster
- utils/init
- include
- libpq
- tools/pgindent
7 files changed
+163
-24
lines changedLines changed: 18 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
| 79 | + | |
79 | 80 |
| |
80 | 81 |
| |
81 | 82 |
| |
| |||
212 | 213 |
| |
213 | 214 |
| |
214 | 215 |
| |
| 216 | + | |
215 | 217 |
| |
216 | 218 |
| |
217 | 219 |
| |
| |||
272 | 274 |
| |
273 | 275 |
| |
274 | 276 |
| |
| 277 | + | |
| 278 | + | |
275 | 279 |
| |
276 |
| - | |
| 280 | + | |
277 | 281 |
| |
278 | 282 |
| |
279 | 283 |
| |
| |||
352 | 356 |
| |
353 | 357 |
| |
354 | 358 |
| |
| 359 | + | |
355 | 360 |
| |
356 | 361 |
| |
357 | 362 |
| |
| |||
422 | 427 |
| |
423 | 428 |
| |
424 | 429 |
| |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
425 | 436 |
| |
426 | 437 |
| |
427 | 438 |
| |
| |||
1270 | 1281 |
| |
1271 | 1282 |
| |
1272 | 1283 |
| |
| 1284 | + | |
1273 | 1285 |
| |
1274 | 1286 |
| |
1275 | 1287 |
| |
| |||
1479 | 1491 |
| |
1480 | 1492 |
| |
1481 | 1493 |
| |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
1482 | 1499 |
| |
1483 | 1500 |
| |
1484 | 1501 |
| |
|
Lines changed: 13 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
333 | 333 |
| |
334 | 334 |
| |
335 | 335 |
| |
336 |
| - | |
337 |
| - | |
| 336 | + | |
| 337 | + | |
338 | 338 |
| |
339 | 339 |
| |
340 | 340 |
| |
341 | 341 |
| |
342 | 342 |
| |
343 | 343 |
| |
344 |
| - | |
345 |
| - | |
| 344 | + | |
| 345 | + | |
346 | 346 |
| |
347 | 347 |
| |
348 | 348 |
| |
349 | 349 |
| |
350 | 350 |
| |
351 | 351 |
| |
352 |
| - | |
| 352 | + | |
353 | 353 |
| |
354 | 354 |
| |
355 | 355 |
| |
| |||
360 | 360 |
| |
361 | 361 |
| |
362 | 362 |
| |
363 |
| - | |
| 363 | + | |
364 | 364 |
| |
365 | 365 |
| |
366 |
| - | |
| 366 | + | |
| 367 | + | |
367 | 368 |
| |
368 | 369 |
| |
369 | 370 |
| |
370 | 371 |
| |
371 | 372 |
| |
372 | 373 |
| |
373 |
| - | |
374 |
| - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
375 | 377 |
| |
376 | 378 |
| |
377 | 379 |
| |
| |||
1907 | 1909 |
| |
1908 | 1910 |
| |
1909 | 1911 |
| |
1910 |
| - | |
| 1912 | + | |
| 1913 | + | |
1911 | 1914 |
| |
1912 | 1915 |
| |
1913 | 1916 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4305 | 4305 |
| |
4306 | 4306 |
| |
4307 | 4307 |
| |
| 4308 | + | |
4308 | 4309 |
| |
4309 | 4310 |
| |
4310 | 4311 |
| |
|
Lines changed: 93 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
936 | 936 |
| |
937 | 937 |
| |
938 | 938 |
| |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
939 | 1032 |
| |
940 | 1033 |
| |
941 | 1034 |
| |
|
Lines changed: 32 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
88 | 88 |
| |
89 | 89 |
| |
90 | 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 | + | |
91 | 122 |
| |
92 | 123 |
| |
93 | 124 |
| |
| |||
148 | 179 |
| |
149 | 180 |
| |
150 | 181 |
| |
151 |
| - | |
152 |
| - | |
153 |
| - | |
154 |
| - | |
155 |
| - | |
156 |
| - | |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 |
| - | |
161 |
| - | |
162 |
| - | |
163 |
| - | |
164 | 182 |
| |
165 | 183 |
| |
166 | 184 |
| |
| |||
317 | 335 |
| |
318 | 336 |
| |
319 | 337 |
| |
| 338 | + | |
320 | 339 |
| |
321 | 340 |
| |
322 | 341 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
482 | 482 |
| |
483 | 483 |
| |
484 | 484 |
| |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
485 | 489 |
| |
486 | 490 |
| |
487 | 491 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
373 | 373 |
| |
374 | 374 |
| |
375 | 375 |
| |
| 376 | + | |
376 | 377 |
| |
377 | 378 |
| |
378 | 379 |
| |
| |||
2455 | 2456 |
| |
2456 | 2457 |
| |
2457 | 2458 |
| |
| 2459 | + | |
2458 | 2460 |
| |
2459 | 2461 |
| |
2460 | 2462 |
| |
|
0 commit comments
Comments
(0)