forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit092c693
committed
Set wal_receiver_create_temp_slot PGC_POSTMASTER
Commit3297308 gave walreceiver the ability to create and use atemporary replication slot, and made it controllable by a GUC (enabledby default) that can be changed with SIGHUP. That's useful but has twoproblems: one, it's possible to cause the origin server to fill its diskif the slot doesn't advance in time; and also there's a disconnectbetween state passed down via the startup process and GUCs thatwalreceiver reads directly.We handle the first problem by setting the option to disabled bydefault. If the user enables it, its on their head to make sure thatdisk doesn't fill up.We handle the second problem by passing the flag via startup rather thanhaving walreceiver acquire it directly, and making it PGC_POSTMASTER(which ensures a walreceiver always has the fresh value). A futurecommit can relax this (to PGC_SIGHUP again) by having the startupprocess signal walreceiver to shutdown whenever the value changes.Author: Sergei Kornilov <sk@zsrv.org>Reviewed-by: Michael Paquier <michael@paquier.xyz>Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>Discussion:https://postgr.es/m/20200122055510.GH174860@paquier.xyz1 parentfbc7a71 commit092c693
File tree
8 files changed
+63
-50
lines changed- doc/src/sgml
- src
- backend
- access/transam
- replication
- utils/misc
- include
- access
- replication
8 files changed
+63
-50
lines changedLines changed: 1 addition & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4163 | 4163 |
| |
4164 | 4164 |
| |
4165 | 4165 |
| |
4166 |
| - | |
4167 |
| - | |
4168 |
| - | |
4169 |
| - | |
4170 |
| - | |
| 4166 | + | |
4171 | 4167 |
| |
4172 | 4168 |
| |
4173 | 4169 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
290 | 290 |
| |
291 | 291 |
| |
292 | 292 |
| |
| 293 | + | |
293 | 294 |
| |
294 | 295 |
| |
295 | 296 |
| |
| |||
11975 | 11976 |
| |
11976 | 11977 |
| |
11977 | 11978 |
| |
11978 |
| - | |
| 11979 | + | |
| 11980 | + | |
11979 | 11981 |
| |
11980 | 11982 |
| |
11981 | 11983 |
| |
|
Lines changed: 28 additions & 34 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
18 | 24 |
| |
19 | 25 |
| |
20 | 26 |
| |
| |||
73 | 79 |
| |
74 | 80 |
| |
75 | 81 |
| |
76 |
| - | |
77 |
| - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
78 | 87 |
| |
79 | 88 |
| |
80 | 89 |
| |
| |||
236 | 245 |
| |
237 | 246 |
| |
238 | 247 |
| |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
239 | 254 |
| |
240 | 255 |
| |
241 | 256 |
| |
| |||
349 | 364 |
| |
350 | 365 |
| |
351 | 366 |
| |
352 |
| - | |
353 |
| - | |
354 |
| - | |
355 |
| - | |
356 |
| - | |
357 |
| - | |
358 |
| - | |
359 |
| - | |
360 |
| - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
361 | 370 |
| |
362 |
| - | |
| 371 | + | |
363 | 372 |
| |
364 |
| - | |
365 |
| - | |
366 |
| - | |
367 |
| - | |
368 |
| - | |
369 |
| - | |
370 |
| - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
371 | 376 |
| |
372 |
| - | |
373 |
| - | |
374 |
| - | |
375 |
| - | |
376 |
| - | |
377 |
| - | |
378 |
| - | |
379 |
| - | |
| 377 | + | |
380 | 378 |
| |
381 |
| - | |
382 |
| - | |
383 |
| - | |
384 |
| - | |
385 |
| - | |
386 |
| - | |
387 |
| - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
388 | 382 |
| |
389 | 383 |
| |
390 | 384 |
| |
|
Lines changed: 23 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
215 | 215 |
| |
216 | 216 |
| |
217 | 217 |
| |
218 |
| - | |
219 |
| - | |
220 |
| - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
221 | 227 |
| |
222 | 228 |
| |
223 | 229 |
| |
224 |
| - | |
| 230 | + | |
225 | 231 |
| |
226 | 232 |
| |
227 | 233 |
| |
| |||
248 | 254 |
| |
249 | 255 |
| |
250 | 256 |
| |
251 |
| - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
252 | 265 |
| |
| 266 | + | |
| 267 | + | |
253 | 268 |
| |
| 269 | + | |
254 | 270 |
| |
| 271 | + | |
| 272 | + | |
255 | 273 |
| |
256 | 274 |
| |
257 | 275 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2050 | 2050 |
| |
2051 | 2051 |
| |
2052 | 2052 |
| |
2053 |
| - | |
| 2053 | + | |
2054 | 2054 |
| |
2055 | 2055 |
| |
2056 | 2056 |
| |
2057 |
| - | |
| 2057 | + | |
2058 | 2058 |
| |
2059 | 2059 |
| |
2060 | 2060 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
321 | 321 |
| |
322 | 322 |
| |
323 | 323 |
| |
324 |
| - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
325 | 327 |
| |
326 | 328 |
| |
327 | 329 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
129 | 129 |
| |
130 | 130 |
| |
131 | 131 |
| |
| 132 | + | |
132 | 133 |
| |
133 | 134 |
| |
134 | 135 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
27 | 26 |
| |
28 | 27 |
| |
29 | 28 |
| |
| |||
321 | 320 |
| |
322 | 321 |
| |
323 | 322 |
| |
324 |
| - | |
| 323 | + | |
| 324 | + | |
325 | 325 |
| |
326 | 326 |
| |
327 | 327 |
| |
|
0 commit comments
Comments
(0)