forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit84adc8e
committed
pg_dump: Add support for zstd compression
Allow pg_dump to use the zstd compression, in addition to gzip/lz4. Bulkof the new compression method is implemented in compress_zstd.{c,h},covering the pg_dump compression APIs. The rest of the patch adds testand makes various places aware of the new compression method.The zstd library (which this patch relies on) supports multithreadedcompression since version 1.5. We however disallow that feature for now,as it might interfere with parallel backups on platforms that rely onthreads (e.g. Windows). This can be improved / relaxed in the future.This also fixes a minor issue in InitDiscoverCompressFileHandle(), whichwas not updated to check if the file already has the .lz4 extension.Adding zstd compression was originally proposed in 2020 (see the secondthread), but then was reworked to use the new compression API introducedine996073. I've considered both threads when compiling the list ofreviewers.Author: Justin PryzbyReviewed-by: Tomas Vondra, Jacob Champion, Andreas KarlssonDiscussion:https://postgr.es/m/20230224191840.GD1653@telsasoft.comDiscussion:https://postgr.es/m/20201221194924.GI30237@telsasoft.com1 parent794f259 commit84adc8e
File tree
12 files changed
+713
-54
lines changed- doc/src/sgml/ref
- src
- bin/pg_dump
- t
- tools
- pginclude
- pgindent
12 files changed
+713
-54
lines changedLines changed: 8 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
330 | 330 |
| |
331 | 331 |
| |
332 | 332 |
| |
333 |
| - | |
334 |
| - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
335 | 336 |
| |
336 | 337 |
| |
337 | 338 |
| |
| |||
655 | 656 |
| |
656 | 657 |
| |
657 | 658 |
| |
658 |
| - | |
| 659 | + | |
| 660 | + | |
659 | 661 |
| |
660 | 662 |
| |
661 | 663 |
| |
| |||
676 | 678 |
| |
677 | 679 |
| |
678 | 680 |
| |
679 |
| - | |
680 |
| - | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
681 | 684 |
| |
682 | 685 |
| |
683 | 686 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
| 33 | + | |
32 | 34 |
| |
33 | 35 |
| |
34 | 36 |
| |
|
Lines changed: 40 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 |
| - | |
56 |
| - | |
| 55 | + | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
| |||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
| 72 | + | |
72 | 73 |
| |
73 | 74 |
| |
74 | 75 |
| |
| |||
77 | 78 |
| |
78 | 79 |
| |
79 | 80 |
| |
80 |
| - | |
| 81 | + | |
| 82 | + | |
81 | 83 |
| |
82 | 84 |
| |
83 | 85 |
| |
| |||
98 | 100 |
| |
99 | 101 |
| |
100 | 102 |
| |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
101 | 107 |
| |
102 | 108 |
| |
103 | 109 |
| |
| |||
130 | 136 |
| |
131 | 137 |
| |
132 | 138 |
| |
| 139 | + | |
| 140 | + | |
133 | 141 |
| |
134 | 142 |
| |
135 | 143 |
| |
| |||
196 | 204 |
| |
197 | 205 |
| |
198 | 206 |
| |
| 207 | + | |
| 208 | + | |
199 | 209 |
| |
200 | 210 |
| |
201 | 211 |
| |
202 | 212 |
| |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
203 | 227 |
| |
204 | 228 |
| |
205 | 229 |
| |
206 | 230 |
| |
207 | 231 |
| |
208 |
| - | |
| 232 | + | |
209 | 233 |
| |
210 | 234 |
| |
211 | 235 |
| |
212 |
| - | |
| 236 | + | |
213 | 237 |
| |
214 | 238 |
| |
215 | 239 |
| |
| |||
229 | 253 |
| |
230 | 254 |
| |
231 | 255 |
| |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
232 | 260 |
| |
233 | 261 |
| |
234 |
| - | |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
| 262 | + | |
239 | 263 |
| |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - | |
249 |
| - | |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 |
| - | |
259 |
| - | |
260 |
| - | |
261 |
| - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
262 | 270 |
| |
263 | 271 |
| |
264 | 272 |
| |
|
0 commit comments
Comments
(0)