forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8e93a51
committed
Don't propagate PGAPPNAME through pg_ctl in tests
When libpq is loaded in the server (for instance, bylibpqwalreceiver), it may use libpq environment variables set in thepostmaster environment for connection parameter defaults. This hassome confusing effects in our test suites. For example, the TAP testinfrastructure sets PGAPPNAME to allow identifying clients in theserver log. But this environment variable is also inherited bytemporary servers started with pg_ctl and is then in turn used bylibpqwalreceiver as the application_name for connecting to remoteservers where it then shows up in pg_stat_replication and is relevantfor things like synchronous_standby_names. Replication already has asuitable default for application_name, and overriding thataccidentally then requires the individual test cases to re-overridethat, which is all very confusing and unnecessary.To fix, unset PGAPPNAME temporarily before running pg_ctl start orrestart in the tests.More comprehensive approaches like unsetting all environment variablesin pg_ctl were considered but might be too complicated to achieveportably.The now unnecessary re-overriding of application_name by test cases isalso removed.Reviewed-by: Noah Misch <noah@leadboat.com>Discussion:https://www.postgresql.org/message-id/flat/33383613-690e-6f1b-d5ba-4957ff40f6ce@2ndquadrant.com1 parentc21d603 commit8e93a51
File tree
13 files changed
+82
-71
lines changed- src
- bin/pg_rewind/t
- test
- perl
- recovery/t
- subscription/t
13 files changed
+82
-71
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
163 |
| - | |
| 163 | + | |
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
| |||
180 | 180 |
| |
181 | 181 |
| |
182 | 182 |
| |
183 |
| - | |
| 183 | + | |
184 | 184 |
| |
185 | 185 |
| |
186 | 186 |
| |
|
Lines changed: 27 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
698 | 698 |
| |
699 | 699 |
| |
700 | 700 |
| |
| 701 | + | |
| 702 | + | |
701 | 703 |
| |
| 704 | + | |
702 | 705 |
| |
703 |
| - | |
704 |
| - | |
705 |
| - | |
706 |
| - | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
707 | 719 |
| |
708 | 720 |
| |
709 | 721 |
| |
| |||
776 | 788 |
| |
777 | 789 |
| |
778 | 790 |
| |
| 791 | + | |
779 | 792 |
| |
780 |
| - | |
781 |
| - | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
782 | 802 |
| |
783 | 803 |
| |
784 | 804 |
| |
| |||
835 | 855 |
| |
836 | 856 |
| |
837 | 857 |
| |
838 |
| - | |
| 858 | + | |
839 | 859 |
| |
840 | 860 |
| |
841 | 861 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
53 |
| - | |
| 53 | + | |
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
|
Lines changed: 13 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
66 |
| - | |
67 | 66 |
| |
68 |
| - | |
| 67 | + | |
69 | 68 |
| |
70 | 69 |
| |
71 |
| - | |
| 70 | + | |
72 | 71 |
| |
73 | 72 |
| |
74 | 73 |
| |
| |||
103 | 102 |
| |
104 | 103 |
| |
105 | 104 |
| |
106 |
| - | |
| 105 | + | |
107 | 106 |
| |
108 | 107 |
| |
109 | 108 |
| |
| |||
146 | 145 |
| |
147 | 146 |
| |
148 | 147 |
| |
149 |
| - | |
| 148 | + | |
150 | 149 |
| |
151 | 150 |
| |
152 | 151 |
| |
| |||
165 | 164 |
| |
166 | 165 |
| |
167 | 166 |
| |
168 |
| - | |
| 167 | + | |
169 | 168 |
| |
170 | 169 |
| |
171 |
| - | |
| 170 | + | |
172 | 171 |
| |
173 | 172 |
| |
174 |
| - | |
| 173 | + | |
175 | 174 |
| |
176 | 175 |
| |
177 | 176 |
| |
178 |
| - | |
| 177 | + | |
179 | 178 |
| |
180 | 179 |
| |
181 | 180 |
| |
182 | 181 |
| |
183 | 182 |
| |
184 |
| - | |
| 183 | + | |
185 | 184 |
| |
186 | 185 |
| |
187 | 186 |
| |
| |||
193 | 192 |
| |
194 | 193 |
| |
195 | 194 |
| |
196 |
| - | |
| 195 | + | |
197 | 196 |
| |
198 | 197 |
| |
199 | 198 |
| |
| |||
216 | 215 |
| |
217 | 216 |
| |
218 | 217 |
| |
219 |
| - | |
| 218 | + | |
220 | 219 |
| |
221 | 220 |
| |
222 | 221 |
| |
| |||
230 | 229 |
| |
231 | 230 |
| |
232 | 231 |
| |
233 |
| - | |
| 232 | + | |
234 | 233 |
| |
235 | 234 |
| |
236 | 235 |
| |
237 | 236 |
| |
238 |
| - | |
| 237 | + | |
239 | 238 |
| |
240 | 239 |
| |
241 | 240 |
| |
|
Lines changed: 6 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
110 |
| - | |
111 | 110 |
| |
112 |
| - | |
| 111 | + | |
113 | 112 |
| |
114 | 113 |
| |
115 |
| - | |
| 114 | + | |
116 | 115 |
| |
117 | 116 |
| |
118 | 117 |
| |
| |||
251 | 250 |
| |
252 | 251 |
| |
253 | 252 |
| |
254 |
| - | |
| 253 | + | |
255 | 254 |
| |
256 | 255 |
| |
257 | 256 |
| |
| |||
372 | 371 |
| |
373 | 372 |
| |
374 | 373 |
| |
375 |
| - | |
| 374 | + | |
376 | 375 |
| |
377 | 376 |
| |
378 | 377 |
| |
| |||
492 | 491 |
| |
493 | 492 |
| |
494 | 493 |
| |
495 |
| - | |
| 494 | + | |
496 | 495 |
| |
497 | 496 |
| |
498 | 497 |
| |
| |||
554 | 553 |
| |
555 | 554 |
| |
556 | 555 |
| |
557 |
| - | |
| 556 | + | |
558 | 557 |
| |
559 | 558 |
| |
560 | 559 |
| |
|
Lines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
38 | 37 |
| |
39 |
| - | |
| 38 | + | |
40 | 39 |
| |
41 | 40 |
| |
42 |
| - | |
| 41 | + | |
43 | 42 |
| |
44 | 43 |
| |
45 | 44 |
| |
46 | 45 |
| |
47 | 46 |
| |
48 | 47 |
| |
49 |
| - | |
| 48 | + | |
50 | 49 |
| |
51 | 50 |
| |
52 | 51 |
| |
| |||
64 | 63 |
| |
65 | 64 |
| |
66 | 65 |
| |
67 |
| - | |
| 66 | + | |
68 | 67 |
| |
69 | 68 |
| |
70 | 69 |
| |
| |||
98 | 97 |
| |
99 | 98 |
| |
100 | 99 |
| |
101 |
| - | |
| 100 | + | |
102 | 101 |
| |
103 | 102 |
| |
104 | 103 |
| |
|
Lines changed: 7 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
35 |
| - | |
36 | 35 |
| |
37 |
| - | |
| 36 | + | |
38 | 37 |
| |
39 | 38 |
| |
40 |
| - | |
| 39 | + | |
41 | 40 |
| |
42 | 41 |
| |
43 | 42 |
| |
| |||
57 | 56 |
| |
58 | 57 |
| |
59 | 58 |
| |
60 |
| - | |
| 59 | + | |
61 | 60 |
| |
62 | 61 |
| |
63 | 62 |
| |
| |||
79 | 78 |
| |
80 | 79 |
| |
81 | 80 |
| |
82 |
| - | |
| 81 | + | |
83 | 82 |
| |
84 | 83 |
| |
85 | 84 |
| |
| |||
101 | 100 |
| |
102 | 101 |
| |
103 | 102 |
| |
104 |
| - | |
| 103 | + | |
105 | 104 |
| |
106 | 105 |
| |
107 | 106 |
| |
| |||
120 | 119 |
| |
121 | 120 |
| |
122 | 121 |
| |
123 |
| - | |
| 122 | + | |
124 | 123 |
| |
125 | 124 |
| |
126 | 125 |
| |
| |||
143 | 142 |
| |
144 | 143 |
| |
145 | 144 |
| |
146 |
| - | |
| 145 | + | |
147 | 146 |
| |
148 | 147 |
| |
149 | 148 |
| |
|
Lines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
26 | 25 |
| |
27 | 26 |
| |
28 | 27 |
| |
29 | 28 |
| |
30 |
| - | |
| 29 | + | |
31 | 30 |
| |
32 | 31 |
| |
33 |
| - | |
| 32 | + | |
34 | 33 |
| |
35 | 34 |
| |
36 | 35 |
| |
| |||
41 | 40 |
| |
42 | 41 |
| |
43 | 42 |
| |
44 |
| - | |
| 43 | + | |
45 | 44 |
| |
46 | 45 |
| |
47 | 46 |
| |
|
0 commit comments
Comments
(0)