forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitffc9dda
committed
Add TAP tests for ZLIB compression for pg_receivewal
There is a non-trivial amount of code that handles ZLIB compression inpg_receivewal, from basics like the format name, the calculation of thestart streaming position and of course the compression itself, but therewas no automated coverage for it.This commit introduces a set of conditional tests (if the build supportsZLIB) to cover the creation of ZLIB-compressed WAL segments, thehandling of the partial, compressed, WAL segments and the compressionoperation in itself. Note that there is an extra phase checking thevalidity of the generated files by using directly a gzip command, passeddown by the Makefile of pg_receivewal. This part is skipped if thecommand cannot be found, something likely going to happen on Windowswith MSVC except if one sets the variable GZIP_PROGRAM in theenvironment of the test.This set of tests will become handy for upcoming patches that add moreoptions for the compression methods used by pg_receivewal, like LZ4, tomake sure that no existing facilities are broken.Author: Georgios KokolatosReviewed-by: Gilles Darold, Michael PaquierDiscussion:https://postgr.es/m/07BK3Mk5aEOsTwGaY77qBVyf9GjoEzn8TMgHLyPGfEFPIpTEmoQuP2P4c7teesjSg-LPeUafsp1flnPeQYINMSMB_UpggJDoduB5EDYBqaQ=@protonmail.com1 parentdc2db1e commitffc9dda
2 files changed
+82
-3
lines changedLines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 |
| - | |
| 21 | + | |
22 | 22 |
| |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 |
| |
24 | 28 |
| |
25 | 29 |
| |
|
Lines changed: 77 additions & 2 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 |
| |
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 |
| |
63 | 65 |
| |
64 | 66 |
| |
65 | 67 |
| |
66 | 68 |
| |
67 | 69 |
| |
68 | 70 |
| |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 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 | + | |
| 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 | + | |
69 | 144 |
| |
70 | 145 |
| |
71 | 146 |
| |
|
0 commit comments
Comments
(0)