forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc96de2c
committed
Common function for percent placeholder replacement
There are a number of places where a shell command is constructed withpercent-placeholders (like %x). It's cumbersome to have to open-codethis several times. This factors out this logic into a separatefunction. This also allows us to ensure consistency for and documentsome subtle behaviors, such as what to do with unrecognizedplaceholders.The unified handling is now that incorrect and unknown placeholdersare an error, where previously in most cases they were skipped orignored. This affects the following settings:- archive_cleanup_command- archive_command- recovery_end_command- restore_command- ssl_passphrase_commandThe following settings are part of this refactoring but already hadstricter error handling and should be unchanged in their behavior:- basebackup_to_shell.commandReviewed-by: Nathan Bossart <nathandbossart@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/5238bbed-0b01-83a6-d4b2-7eb0562a054e%40enterprisedb.com1 parent5f6401f commitc96de2c
File tree
10 files changed
+198
-246
lines changed- contrib/basebackup_to_shell
- src
- backend
- access/transam
- libpq
- postmaster
- common
- fe_utils
- include/common
10 files changed
+198
-246
lines changedLines changed: 3 additions & 53 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
15 | 16 |
| |
16 | 17 |
| |
17 | 18 |
| |
| |||
208 | 209 |
| |
209 | 210 |
| |
210 | 211 |
| |
211 |
| - | |
212 |
| - | |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - | |
249 |
| - | |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 |
| - | |
259 |
| - | |
260 |
| - | |
261 |
| - | |
262 |
| - | |
263 |
| - | |
| 212 | + | |
| 213 | + | |
264 | 214 |
| |
265 | 215 |
| |
266 | 216 |
| |
|
Lines changed: 5 additions & 40 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
| |||
291 | 292 |
| |
292 | 293 |
| |
293 | 294 |
| |
294 |
| - | |
| 295 | + | |
295 | 296 |
| |
296 |
| - | |
297 |
| - | |
298 |
| - | |
299 | 297 |
| |
300 | 298 |
| |
301 | 299 |
| |
| |||
316 | 314 |
| |
317 | 315 |
| |
318 | 316 |
| |
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 |
| - | |
| 317 | + | |
355 | 318 |
| |
356 | 319 |
| |
357 | 320 |
| |
| |||
364 | 327 |
| |
365 | 328 |
| |
366 | 329 |
| |
| 330 | + | |
| 331 | + | |
367 | 332 |
| |
368 | 333 |
| |
369 | 334 |
| |
|
Lines changed: 8 additions & 30 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
25 | 26 |
| |
26 | 27 |
| |
27 | 28 |
| |
| |||
39 | 40 |
| |
40 | 41 |
| |
41 | 42 |
| |
42 |
| - | |
43 |
| - | |
| 43 | + | |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
52 |
| - | |
| 52 | + | |
53 | 53 |
| |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 |
| - | |
74 |
| - | |
75 |
| - | |
76 |
| - | |
| 54 | + | |
77 | 55 |
| |
78 | 56 |
| |
79 | 57 |
| |
80 | 58 |
| |
81 | 59 |
| |
82 |
| - | |
| 60 | + | |
83 | 61 |
| |
84 | 62 |
| |
85 | 63 |
| |
| |||
91 | 69 |
| |
92 | 70 |
| |
93 | 71 |
| |
94 |
| - | |
| 72 | + | |
95 | 73 |
| |
96 | 74 |
| |
97 | 75 |
| |
| |||
111 | 89 |
| |
112 | 90 |
| |
113 | 91 |
| |
114 |
| - | |
| 92 | + | |
115 | 93 |
| |
116 | 94 |
| |
117 | 95 |
| |
| |||
120 | 98 |
| |
121 | 99 |
| |
122 | 100 |
| |
123 |
| - | |
| 101 | + | |
124 | 102 |
| |
125 | 103 |
| |
126 | 104 |
| |
|
Lines changed: 13 additions & 48 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
44 | 45 |
| |
45 | 46 |
| |
46 | 47 |
| |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
| 48 | + | |
| 49 | + | |
51 | 50 |
| |
52 | 51 |
| |
53 |
| - | |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
| 52 | + | |
61 | 53 |
| |
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 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
| 54 | + | |
| 55 | + | |
97 | 56 |
| |
98 |
| - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
99 | 62 |
| |
100 | 63 |
| |
101 | 64 |
| |
| |||
155 | 118 |
| |
156 | 119 |
| |
157 | 120 |
| |
| 121 | + | |
| 122 | + | |
158 | 123 |
| |
159 | 124 |
| |
160 | 125 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
| 68 | + | |
68 | 69 |
| |
69 | 70 |
| |
70 | 71 |
| |
|
0 commit comments
Comments
(0)