- Notifications
You must be signed in to change notification settings - Fork28
Commit8bddc86
committed
Add application_name to connection authorized msg
The connection authorized message has quite a bit of useful informationin it, but didn't include the application_name (when provided), so let'sadd that as it can be very useful.Note that at the point where we're emitting the connection authorizedmessage, we haven't processed GUCs, so it's not possible to get this byusing log_line_prefix (which pulls from the GUC). There's alsosomething to be said for having this included in the connectionauthorized message and then not needing to repeat it for every line, ashaving it in log_line_prefix would do.The GUC cleans the application name to pure-ascii, so do that here too,but pull out the logic for cleaning up a string into its own functionin common and re-use it from those places, and check_cluster_name whichwas doing the same thing.Author: Don Seiler <don@seiler.us>Discussion:https://postgr.es/m/CAHJZqBB_Pxv8HRfoh%2BAB4KxSQQuPVvtYCzMg7woNR3r7dfmopw%40mail.gmail.com1 parent2b04dfc commit8bddc86
File tree
6 files changed
+99
-30
lines changed- src
- backend
- postmaster
- utils
- init
- misc
- common
- include
- common
- libpq
6 files changed
+99
-30
lines changedLines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
99 | 99 |
| |
100 | 100 |
| |
101 | 101 |
| |
| 102 | + | |
102 | 103 |
| |
103 | 104 |
| |
104 | 105 |
| |
| |||
2096 | 2097 |
| |
2097 | 2098 |
| |
2098 | 2099 |
| |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
2099 | 2115 |
| |
2100 | 2116 |
| |
2101 | 2117 |
| |
|
Lines changed: 38 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
249 | 249 |
| |
250 | 250 |
| |
251 | 251 |
| |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
258 | 266 |
| |
259 | 267 |
| |
260 | 268 |
| |
261 |
| - | |
262 |
| - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
263 | 275 |
| |
264 | 276 |
| |
265 | 277 |
| |
266 | 278 |
| |
267 | 279 |
| |
268 | 280 |
| |
269 |
| - | |
270 |
| - | |
271 |
| - | |
272 |
| - | |
273 |
| - | |
274 |
| - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
275 | 294 |
| |
276 | 295 |
| |
277 | 296 |
| |
278 |
| - | |
279 |
| - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
280 | 302 |
| |
281 | 303 |
| |
282 | 304 |
| |
|
Lines changed: 3 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| 44 | + | |
44 | 45 |
| |
45 | 46 |
| |
46 | 47 |
| |
| |||
10760 | 10761 |
| |
10761 | 10762 |
| |
10762 | 10763 |
| |
10763 |
| - | |
10764 |
| - | |
10765 |
| - | |
10766 |
| - | |
10767 |
| - | |
10768 |
| - | |
10769 |
| - | |
| 10764 | + | |
10770 | 10765 |
| |
10771 | 10766 |
| |
10772 | 10767 |
| |
| |||
10782 | 10777 |
| |
10783 | 10778 |
| |
10784 | 10779 |
| |
10785 |
| - | |
10786 |
| - | |
10787 |
| - | |
10788 |
| - | |
10789 |
| - | |
10790 |
| - | |
10791 |
| - | |
| 10780 | + | |
10792 | 10781 |
| |
10793 | 10782 |
| |
10794 | 10783 |
| |
|
Lines changed: 34 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 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 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| 16 | + | |
16 | 17 |
| |
17 | 18 |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
141 | 148 |
| |
142 | 149 |
| |
143 | 150 |
| |
|
0 commit comments
Comments
(0)