forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf081a48
committed
Unify buffer sizes in pg_dump compression API
Prior to the introduction of the compression API ine996073, pg_dumpwould use the ZLIB_IN_SIZE/ZLIB_OUT_SIZE to size input/output buffers.Commit0da243f introduced similar constants for LZ4, but while gzipdefined both buffers to be 4kB, LZ4 used 4kB and 16kB without any clearreasoning why that's desirable.Furthermore, parts of the code unaware of which compression is used(e.g. pg_backup_directory.c) continued to use ZLIB_OUT_SIZE directly.Simplify by replacing the various constants with DEFAULT_IO_BUFFER_SIZE,set to 4kB. The compression implementations still have an option to usea custom value, but considering 4kB was fine for 20+ years, I find thatunlikely (and we'd probably just increase the default buffer size).Author: Georgios KokolatosReviewed-by: Tomas Vondra, Justin PryzbyDiscussion:https://postgr.es/m/33496f7c-3449-1426-d568-63f6bca2ac1f@gmail.com1 parentd3b5775 commitf081a48
File tree
5 files changed
+21
-25
lines changed- src/bin/pg_dump
5 files changed
+21
-25
lines changedLines changed: 11 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
123 |
| - | |
124 |
| - | |
| 123 | + | |
| 124 | + | |
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
| |||
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
161 |
| - | |
162 |
| - | |
| 161 | + | |
| 162 | + | |
163 | 163 |
| |
164 |
| - | |
| 164 | + | |
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
| |||
176 | 176 |
| |
177 | 177 |
| |
178 | 178 |
| |
179 |
| - | |
| 179 | + | |
180 | 180 |
| |
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
184 | 184 |
| |
185 |
| - | |
186 |
| - | |
| 185 | + | |
| 186 | + | |
187 | 187 |
| |
188 | 188 |
| |
189 | 189 |
| |
| |||
192 | 192 |
| |
193 | 193 |
| |
194 | 194 |
| |
195 |
| - | |
| 195 | + | |
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
200 |
| - | |
201 |
| - | |
| 200 | + | |
| 201 | + | |
202 | 202 |
| |
203 | 203 |
| |
204 | 204 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
21 |
| - | |
22 |
| - | |
| 20 | + | |
| 21 | + | |
23 | 22 |
| |
24 | 23 |
| |
25 | 24 |
| |
|
Lines changed: 4 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
24 |
| - | |
25 |
| - | |
26 | 23 |
| |
27 | 24 |
| |
28 | 25 |
| |
| |||
57 | 54 |
| |
58 | 55 |
| |
59 | 56 |
| |
60 |
| - | |
| 57 | + | |
61 | 58 |
| |
62 | 59 |
| |
63 | 60 |
| |
| |||
208 | 205 |
| |
209 | 206 |
| |
210 | 207 |
| |
211 |
| - | |
| 208 | + | |
212 | 209 |
| |
213 | 210 |
| |
214 | 211 |
| |
| |||
244 | 241 |
| |
245 | 242 |
| |
246 | 243 |
| |
247 |
| - | |
| 244 | + | |
248 | 245 |
| |
249 | 246 |
| |
250 | 247 |
| |
| |||
423 | 420 |
| |
424 | 421 |
| |
425 | 422 |
| |
426 |
| - | |
| 423 | + | |
427 | 424 |
| |
428 | 425 |
| |
429 | 426 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 |
| - | |
37 |
| - | |
| 36 | + | |
| 37 | + | |
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
394 | 394 |
| |
395 | 395 |
| |
396 | 396 |
| |
397 |
| - | |
398 |
| - | |
| 397 | + | |
| 398 | + | |
399 | 399 |
| |
400 | 400 |
| |
401 | 401 |
| |
|
0 commit comments
Comments
(0)