forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd18655c
committed
Refactor code parsing compression option values (-Z/--compress)
This commit moves the code in charge of deparsing the method and detailstrings fed later to parse_compress_specification() to a common routine,where the backward-compatible case of only an integer being found (N= 0 => "none", N > 1 => gzip at level N) is handled.Note that this has a side-effect for pg_basebackup, as we now attempt todetect "server-" and "client-" before checking for the integer-onlypre-14 grammar, where values like server-N and client-N (without thefollow-up detail string) are now valid rather than failing because of anunsupported method name. Past grammars are still handled the same way,but these flavors are now authorized, and would now switch to consider N= 0 as no compression and N > 1 as gzip with the compression level usedas N, with the caller still controlling if the compression method shouldbe done server-side, client-side or is unspecified. The documentationof pg_basebackup is updated to reflect that.This benefits other code paths that would like to rely on the same logicas pg_basebackup and pg_receivewal with option values used forcompression specifications, one area discussed lately being pg_dump.Author: Georgios Kokolatos, Michael PaquierDiscussion:https://postgr.es/m/O4mutIrCES8ZhlXJiMvzsivT7ztAMja2lkdL1LJx6O5f22I2W8PBIeLKz7mDLwxHoibcnRAYJXm1pH4tyUNC4a8eDzLn22a6Pb1S74Niexg=@pm.me1 parentd74a366 commitd18655c
File tree
5 files changed
+82
-108
lines changed- doc/src/sgml/ref
- src
- bin/pg_basebackup
- common
- include/common
5 files changed
+82
-108
lines changedLines changed: 10 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
416 | 416 |
| |
417 | 417 |
| |
418 | 418 |
| |
419 |
| - | |
420 |
| - | |
421 |
| - | |
422 |
| - | |
423 |
| - | |
424 |
| - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
425 | 427 |
| |
426 | 428 |
| |
| 429 | + | |
| 430 | + | |
427 | 431 |
| |
428 | 432 |
| |
429 | 433 |
| |
|
Lines changed: 7 additions & 41 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
956 | 956 |
| |
957 | 957 |
| |
958 | 958 |
| |
959 |
| - | |
960 |
| - | |
| 959 | + | |
| 960 | + | |
961 | 961 |
| |
962 |
| - | |
963 |
| - | |
964 |
| - | |
965 | 962 |
| |
966 |
| - | |
967 |
| - | |
968 |
| - | |
| 963 | + | |
969 | 964 |
| |
970 |
| - | |
971 |
| - | |
972 |
| - | |
973 |
| - | |
974 |
| - | |
975 |
| - | |
976 |
| - | |
977 |
| - | |
978 |
| - | |
979 |
| - | |
980 | 965 |
| |
981 | 966 |
| |
982 | 967 |
| |
| |||
990 | 975 |
| |
991 | 976 |
| |
992 | 977 |
| |
993 |
| - | |
994 |
| - | |
995 |
| - | |
996 |
| - | |
997 |
| - | |
998 |
| - | |
999 |
| - | |
1000 |
| - | |
1001 |
| - | |
1002 |
| - | |
1003 |
| - | |
1004 |
| - | |
1005 |
| - | |
1006 |
| - | |
1007 |
| - | |
1008 |
| - | |
1009 |
| - | |
1010 |
| - | |
1011 |
| - | |
1012 |
| - | |
1013 |
| - | |
| 978 | + | |
| 979 | + | |
1014 | 980 |
| |
1015 | 981 |
| |
1016 | 982 |
| |
| |||
2411 | 2377 |
| |
2412 | 2378 |
| |
2413 | 2379 |
| |
2414 |
| - | |
2415 |
| - | |
| 2380 | + | |
| 2381 | + | |
2416 | 2382 |
| |
2417 | 2383 |
| |
2418 | 2384 |
| |
|
Lines changed: 0 additions & 61 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
61 |
| - | |
62 | 60 |
| |
63 | 61 |
| |
64 | 62 |
| |
| |||
109 | 107 |
| |
110 | 108 |
| |
111 | 109 |
| |
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 |
| - | |
161 |
| - | |
162 |
| - | |
163 |
| - | |
164 |
| - | |
165 |
| - | |
166 |
| - | |
167 |
| - | |
168 |
| - | |
169 |
| - | |
170 |
| - | |
171 | 110 |
| |
172 | 111 |
| |
173 | 112 |
| |
|
Lines changed: 63 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
356 | 356 |
| |
357 | 357 |
| |
358 | 358 |
| |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + |
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
| 37 | + | |
36 | 38 |
| |
37 | 39 |
| |
38 | 40 |
| |
|
0 commit comments
Comments
(0)