forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit51c0d18
committed
Allow parallel zstd compression when taking a base backup.
libzstd allows transparent parallel compression just by settingan option when creating the compression context, so permit thatfor both client and server-side backup compression. To use this,use something like pg_basebackup --compress WHERE-zstd:workers=Nwhere WHERE is "client" or "server" and N is an integer.When compression is performed on the server side, this will spawnthreads inside the PostgreSQL backend. While there is almost noPostgreSQL server code which is thread-safe, the threads here are usedinternally by libzstd and touch only data structures controlled bylibzstd.Patch by me, based in part on earlier work by Dipesh Panditand Jeevan Ladhe. Reviewed by Justin Pryzby.Discussion:http://postgr.es/m/CA+Tgmobj6u-nWF-j=FemygUhobhryLxf9h-wJN7W-2rSsseHNA@mail.gmail.com1 parentc6863b8 commit51c0d18
File tree
9 files changed
+147
-39
lines changed- doc/src/sgml
- ref
- src
- backend/replication
- bin
- pg_basebackup
- t
- pg_verifybackup/t
- common
- include/common
9 files changed
+147
-39
lines changedLines changed: 9 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2739 | 2739 |
| |
2740 | 2740 |
| |
2741 | 2741 |
| |
2742 |
| - | |
2743 |
| - | |
2744 |
| - | |
| 2742 | + | |
| 2743 | + | |
2745 | 2744 |
| |
2746 | 2745 |
| |
2747 | 2746 |
| |
| 2747 | + | |
2748 | 2748 |
| |
2749 | 2749 |
| |
2750 | 2750 |
| |
2751 | 2751 |
| |
2752 | 2752 |
| |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
2753 | 2759 |
| |
2754 | 2760 |
| |
2755 | 2761 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
424 | 424 |
| |
425 | 425 |
| |
426 | 426 |
| |
427 |
| - | |
428 |
| - | |
| 427 | + | |
| 428 | + | |
429 | 429 |
| |
430 | 430 |
| |
431 | 431 |
| |
|
Lines changed: 28 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
29 |
| - | |
| 28 | + | |
| 29 | + | |
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| |||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
70 |
| - | |
71 | 70 |
| |
72 | 71 |
| |
73 | 72 |
| |
74 |
| - | |
75 |
| - | |
76 |
| - | |
77 |
| - | |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
82 | 73 |
| |
83 | 74 |
| |
84 | 75 |
| |
85 |
| - | |
| 76 | + | |
86 | 77 |
| |
87 | 78 |
| |
88 | 79 |
| |
| |||
99 | 90 |
| |
100 | 91 |
| |
101 | 92 |
| |
| 93 | + | |
102 | 94 |
| |
103 | 95 |
| |
104 | 96 |
| |
105 | 97 |
| |
106 | 98 |
| |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
112 | 123 |
| |
113 | 124 |
| |
114 | 125 |
| |
|
Lines changed: 28 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
70 |
| - | |
71 | 70 |
| |
72 | 71 |
| |
73 | 72 |
| |
| |||
88 | 87 |
| |
89 | 88 |
| |
90 | 89 |
| |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
| 90 | + | |
| 91 | + | |
99 | 92 |
| |
100 |
| - | |
101 |
| - | |
102 |
| - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
103 | 119 |
| |
104 | 120 |
| |
105 | 121 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
133 | 138 |
| |
134 | 139 |
| |
135 | 140 |
| |
|
Lines changed: 27 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 |
| |
38 | 44 |
| |
39 | 45 |
| |
| |||
55 | 61 |
| |
56 | 62 |
| |
57 | 63 |
| |
58 |
| - | |
59 |
| - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
60 | 85 |
| |
61 | 86 |
| |
62 | 87 |
| |
|
Lines changed: 30 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
52 | 61 |
| |
53 | 62 |
| |
54 | 63 |
| |
| |||
69 | 78 |
| |
70 | 79 |
| |
71 | 80 |
| |
72 |
| - | |
73 |
| - | |
74 |
| - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
75 | 102 |
| |
76 | 103 |
| |
77 | 104 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
177 | 177 |
| |
178 | 178 |
| |
179 | 179 |
| |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
180 | 185 |
| |
181 | 186 |
| |
182 | 187 |
| |
| |||
266 | 271 |
| |
267 | 272 |
| |
268 | 273 |
| |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
269 | 285 |
| |
270 | 286 |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
| 33 | + | |
32 | 34 |
| |
33 | 35 |
| |
34 | 36 |
| |
|
0 commit comments
Comments
(0)