forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit18cd15e
committed
Add connection establishment duration logging
Add log_connections option 'setup_durations' which logs durations ofseveral key parts of connection establishment and backend setup.For an incoming connection, starting from when the postmaster gets asocket from accept() and ending when the forked child backend is firstready for query, there are multiple steps that could each take longerthan expected due to external factors. This logging provides visibilityinto authentication and fork duration as well as the end-to-endconnection establishment and backend initialization time.To make this portable, the timings captured in the postmaster (socketcreation time, fork initiation time) are passed through theBackendStartupData.Author: Melanie Plageman <melanieplageman@gmail.com>Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com>Reviewed-by: Daniel Gustafsson <daniel@yesql.se>Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com>Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl>Reviewed-by: Guillaume Lelarge <guillaume.lelarge@dalibo.com>Discussion:https://postgr.es/m/flat/CAAKRu_b_smAHK0ZjrnL5GRxnAVWujEXQWpLXYzGbmpcZd3nLYw%40mail.gmail.com1 parent9219093 commit18cd15e
File tree
12 files changed
+189
-6
lines changed- doc/src/sgml
- src
- backend
- postmaster
- tcop
- utils
- init
- misc
- include
- tcop
- utils
- test/authentication/t
- tools/pgindent
12 files changed
+189
-6
lines changedLines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7369 | 7369 |
| |
7370 | 7370 |
| |
7371 | 7371 |
| |
| 7372 | + | |
| 7373 | + | |
| 7374 | + | |
| 7375 | + | |
| 7376 | + | |
| 7377 | + | |
| 7378 | + | |
| 7379 | + | |
| 7380 | + | |
| 7381 | + | |
| 7382 | + | |
| 7383 | + | |
| 7384 | + | |
7372 | 7385 |
| |
7373 | 7386 |
| |
7374 | 7387 |
| |
|
Lines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
232 | 232 |
| |
233 | 233 |
| |
234 | 234 |
| |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
235 | 239 |
| |
236 | 240 |
| |
237 | 241 |
| |
| |||
240 | 244 |
| |
241 | 245 |
| |
242 | 246 |
| |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
243 | 257 |
| |
244 | 258 |
| |
245 | 259 |
| |
| |||
586 | 600 |
| |
587 | 601 |
| |
588 | 602 |
| |
| 603 | + | |
589 | 604 |
| |
590 | 605 |
| |
591 | 606 |
| |
592 | 607 |
| |
593 | 608 |
| |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
594 | 615 |
| |
595 | 616 |
| |
596 | 617 |
| |
| |||
648 | 669 |
| |
649 | 670 |
| |
650 | 671 |
| |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
651 | 682 |
| |
652 | 683 |
| |
653 | 684 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3477 | 3477 |
| |
3478 | 3478 |
| |
3479 | 3479 |
| |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
3480 | 3486 |
| |
3481 | 3487 |
| |
3482 | 3488 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
49 | 59 |
| |
50 | 60 |
| |
51 | 61 |
| |
| |||
1006 | 1016 |
| |
1007 | 1017 |
| |
1008 | 1018 |
| |
| 1019 | + | |
1009 | 1020 |
| |
1010 | 1021 |
| |
1011 | 1022 |
| |
|
Lines changed: 33 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
| 69 | + | |
69 | 70 |
| |
70 | 71 |
| |
71 | 72 |
| |
| |||
4607 | 4608 |
| |
4608 | 4609 |
| |
4609 | 4610 |
| |
| 4611 | + | |
| 4612 | + | |
| 4613 | + | |
| 4614 | + | |
| 4615 | + | |
| 4616 | + | |
| 4617 | + | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + | |
| 4624 | + | |
| 4625 | + | |
| 4626 | + | |
| 4627 | + | |
| 4628 | + | |
| 4629 | + | |
| 4630 | + | |
| 4631 | + | |
| 4632 | + | |
| 4633 | + | |
| 4634 | + | |
| 4635 | + | |
| 4636 | + | |
| 4637 | + | |
| 4638 | + | |
| 4639 | + | |
| 4640 | + | |
| 4641 | + | |
| 4642 | + | |
4610 | 4643 |
| |
4611 | 4644 |
| |
4612 | 4645 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
235 | 235 |
| |
236 | 236 |
| |
237 | 237 |
| |
| 238 | + | |
| 239 | + | |
| 240 | + | |
238 | 241 |
| |
239 | 242 |
| |
240 | 243 |
| |
| |||
253 | 256 |
| |
254 | 257 |
| |
255 | 258 |
| |
| 259 | + | |
| 260 | + | |
| 261 | + | |
256 | 262 |
| |
257 | 263 |
| |
258 | 264 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
580 | 580 |
| |
581 | 581 |
| |
582 | 582 |
| |
583 |
| - | |
| 583 | + | |
584 | 584 |
| |
585 | 585 |
| |
586 | 586 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
394 | 394 |
| |
395 | 395 |
| |
396 | 396 |
| |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
397 | 405 |
| |
398 | 406 |
| |
399 | 407 |
| |
|
Lines changed: 53 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
| 18 | + | |
17 | 19 |
| |
18 | 20 |
| |
19 | 21 |
| |
20 | 22 |
| |
21 | 23 |
| |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 |
| |
23 | 28 |
| |
24 | 29 |
| |
| |||
39 | 44 |
| |
40 | 45 |
| |
41 | 46 |
| |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
42 | 60 |
| |
43 | 61 |
| |
44 | 62 |
| |
45 | 63 |
| |
46 | 64 |
| |
47 |
| - | |
48 |
| - | |
49 |
| - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
50 | 68 |
| |
51 | 69 |
| |
52 | 70 |
| |
| |||
58 | 76 |
| |
59 | 77 |
| |
60 | 78 |
| |
| 79 | + | |
61 | 80 |
| |
62 | 81 |
| |
63 | 82 |
| |
64 | 83 |
| |
65 | 84 |
| |
66 | 85 |
| |
67 | 86 |
| |
68 |
| - | |
| 87 | + | |
| 88 | + | |
69 | 89 |
| |
70 | 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 | + | |
71 | 120 |
| |
72 | 121 |
| |
73 | 122 |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
88 | 97 |
| |
89 | 98 |
| |
90 | 99 |
| |
|
Lines changed: 17 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
77 | 77 |
| |
78 | 78 |
| |
79 | 79 |
| |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
80 | 94 |
| |
81 |
| - | |
| 95 | + | |
82 | 96 |
| |
83 | 97 |
| |
84 | 98 |
| |
85 | 99 |
| |
86 | 100 |
| |
87 | 101 |
| |
88 | 102 |
| |
| 103 | + | |
89 | 104 |
| |
90 | 105 |
| |
91 | 106 |
| |
| |||
100 | 115 |
| |
101 | 116 |
| |
102 | 117 |
| |
| 118 | + | |
103 | 119 |
| |
104 | 120 |
| |
105 | 121 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
484 | 484 |
| |
485 | 485 |
| |
486 | 486 |
| |
| 487 | + | |
487 | 488 |
| |
488 | 489 |
| |
489 | 490 |
| |
|
0 commit comments
Comments
(0)