forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd62bcc8
committed
Rework compression options of pg_receivewal
pg_receivewal includes sincecada1af the option --compress, to allow thecompression of WAL segments using gzip, with a value of 0 (the default)meaning that no compression can be used.This commit introduces a new option, called --compression-method, ableto use as values "none", the default, and "gzip", to make things moreextensible. The case of --compress=0 becomes fuzzy with this optionlayer, so we have made the choice to make pg_receivewal return an errorwhen using "none" and a non-zero compression level, meaning that theauthorized values of --compress are now [1,9] instead of [0,9]. Notspecifying --compress with "gzip" as compression method makespg_receivewal use the default of zlib instead (Z_DEFAULT_COMPRESSION).The code in charge of finding the streaming start LSN when scanning theexisting archives is refactored and made more extensible. While on it,rename "compression" to "compression_level" in walmethods.c, to reducethe confusion with the introduction of the compression method, even ifthe tar method used by pg_basebackup does not rely on the compressionmethod (yet, at least), but just on the compression level (this areacould be improved more, actually).This is in preparation for an upcoming patch that adds LZ4 support topg_receivewal.Author: Georgios KokolatosReviewed-by: Michael Paquier, Jian Guo, Magnus Hagander, Dilip Kumar,Robert HaasDiscussion:https://postgr.es/m/ZCm1J5vfyQ2E6dYvXz8si39HQ2gwxSZ3IpYaVgYa3lUwY88SLapx9EEnOf5uEwrddhx2twG7zYKjVeuP5MwZXCNPybtsGouDsAD1o2L_I5E=@pm.me1 parent581055c commitd62bcc8
File tree
8 files changed
+231
-103
lines changed- doc/src/sgml/ref
- src
- bin/pg_basebackup
- t
- tools/pgindent
8 files changed
+231
-103
lines changedLines changed: 25 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
263 | 263 |
| |
264 | 264 |
| |
265 | 265 |
| |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
266 | 282 |
| |
267 | 283 |
| |
268 | 284 |
| |
269 | 285 |
| |
270 | 286 |
| |
271 |
| - | |
272 |
| - | |
273 |
| - | |
274 |
| - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
275 | 296 |
| |
276 | 297 |
| |
277 | 298 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
555 | 555 |
| |
556 | 556 |
| |
557 | 557 |
| |
558 |
| - | |
| 558 | + | |
| 559 | + | |
559 | 560 |
| |
560 | 561 |
| |
561 |
| - | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
562 | 565 |
| |
563 | 566 |
| |
564 | 567 |
| |
|
Lines changed: 117 additions & 50 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 |
| |
23 | 26 |
| |
24 | 27 |
| |
| |||
45 | 48 |
| |
46 | 49 |
| |
47 | 50 |
| |
| 51 | + | |
48 | 52 |
| |
49 | 53 |
| |
50 | 54 |
| |
| |||
63 | 67 |
| |
64 | 68 |
| |
65 | 69 |
| |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 |
| - | |
74 |
| - | |
75 |
| - | |
76 | 70 |
| |
77 | 71 |
| |
78 | 72 |
| |
| |||
92 | 86 |
| |
93 | 87 |
| |
94 | 88 |
| |
95 |
| - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
96 | 92 |
| |
97 | 93 |
| |
98 | 94 |
| |
| |||
108 | 104 |
| |
109 | 105 |
| |
110 | 106 |
| |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
111 | 161 |
| |
112 | 162 |
| |
113 | 163 |
| |
| |||
213 | 263 |
| |
214 | 264 |
| |
215 | 265 |
| |
| 266 | + | |
216 | 267 |
| |
217 |
| - | |
218 | 268 |
| |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
| 269 | + | |
| 270 | + | |
243 | 271 |
| |
244 | 272 |
| |
245 | 273 |
| |
| |||
250 | 278 |
| |
251 | 279 |
| |
252 | 280 |
| |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
258 | 286 |
| |
259 | 287 |
| |
260 |
| - | |
| 288 | + | |
261 | 289 |
| |
262 | 290 |
| |
263 | 291 |
| |
| |||
276 | 304 |
| |
277 | 305 |
| |
278 | 306 |
| |
279 |
| - | |
| 307 | + | |
280 | 308 |
| |
281 | 309 |
| |
282 | 310 |
| |
| |||
457 | 485 |
| |
458 | 486 |
| |
459 | 487 |
| |
460 |
| - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
461 | 491 |
| |
462 | 492 |
| |
463 | 493 |
| |
| |||
510 | 540 |
| |
511 | 541 |
| |
512 | 542 |
| |
| 543 | + | |
513 | 544 |
| |
514 | 545 |
| |
515 | 546 |
| |
| |||
595 | 626 |
| |
596 | 627 |
| |
597 | 628 |
| |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
598 | 641 |
| |
599 |
| - | |
| 642 | + | |
600 | 643 |
| |
601 | 644 |
| |
602 | 645 |
| |
| |||
676 | 719 |
| |
677 | 720 |
| |
678 | 721 |
| |
679 |
| - | |
680 |
| - | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
681 | 727 |
| |
682 |
| - | |
683 |
| - | |
684 |
| - | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
685 | 749 |
| |
| 750 | + | |
| 751 | + | |
| 752 | + | |
686 | 753 |
| |
687 | 754 |
| |
688 | 755 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
112 |
| - | |
| 112 | + | |
113 | 113 |
| |
114 | 114 |
| |
115 | 115 |
| |
|
Lines changed: 13 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 |
| |
37 | 44 |
| |
38 | 45 |
| |
| |||
90 | 97 |
| |
91 | 98 |
| |
92 | 99 |
| |
93 |
| - | |
94 |
| - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
95 | 105 |
| |
96 | 106 |
| |
97 | 107 |
| |
|
0 commit comments
Comments
(0)