forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4035cd5
committed
Add support for LZ4 with compression of full-page writes in WAL
The logic is implemented so as there can be a choice in the compressionused when building a WAL record, and an extra per-record bit is used totrack down if a block is compressed with PGLZ, LZ4 or nothing.wal_compression, the existing parameter, is changed to an enum withsupport for the following backward-compatible values:- "off", the default, to not use compression.- "pglz" or "on", to compress FPWs with PGLZ.- "lz4", the new mode, to compress FPWs with LZ4.Benchmarking has showed that LZ4 outclasses easily PGLZ. ZSTD would bealso an interesting choice, but going just with LZ4 for now makes thepatch minimalistic as toast compression is already able to use LZ4, sothere is no need to worry about any build-related needs for thisimplementation.Author: Andrey Borodin, Justin PryzbyReviewed-by: Dilip Kumar, Michael PaquierDiscussion:https://postgr.es/m/3037310D-ECB7-4BF1-AF20-01C10BB33A33@yandex-team.ru1 parentcc2c7d6 commit4035cd5
File tree
13 files changed
+191
-52
lines changed- doc/src/sgml
- src
- backend
- access/transam
- utils/misc
- bin/pg_waldump
- include/access
- tools/pgindent
13 files changed
+191
-52
lines changedLines changed: 9 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3128 | 3128 |
| |
3129 | 3129 |
| |
3130 | 3130 |
| |
3131 |
| - | |
| 3131 | + | |
3132 | 3132 |
| |
3133 | 3133 |
| |
3134 | 3134 |
| |
3135 | 3135 |
| |
3136 | 3136 |
| |
3137 | 3137 |
| |
3138 |
| - | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
3139 | 3141 |
| |
3140 | 3142 |
| |
3141 | 3143 |
| |
3142 |
| - | |
3143 |
| - | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
3144 | 3148 |
| |
3145 | 3149 |
| |
3146 | 3150 |
| |
3147 |
| - | |
| 3151 | + | |
3148 | 3152 |
| |
3149 | 3153 |
| |
3150 | 3154 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
299 | 299 |
| |
300 | 300 |
| |
301 | 301 |
| |
302 |
| - | |
| 302 | + | |
303 | 303 |
| |
304 | 304 |
| |
305 | 305 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
270 | 270 |
| |
271 | 271 |
| |
272 | 272 |
| |
273 |
| - | |
| 273 | + | |
| 274 | + | |
274 | 275 |
| |
275 | 276 |
| |
276 | 277 |
| |
| |||
980 | 981 |
| |
981 | 982 |
| |
982 | 983 |
| |
983 |
| - | |
| 984 | + | |
984 | 985 |
| |
985 | 986 |
| |
986 | 987 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 |
| |
56 | 60 |
| |
57 | 61 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
101 |
| - | |
| 101 | + | |
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
|
Lines changed: 64 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 |
| - | |
37 |
| - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
38 | 50 |
| |
39 | 51 |
| |
40 | 52 |
| |
| |||
58 | 70 |
| |
59 | 71 |
| |
60 | 72 |
| |
61 |
| - | |
| 73 | + | |
62 | 74 |
| |
63 | 75 |
| |
64 | 76 |
| |
| |||
628 | 640 |
| |
629 | 641 |
| |
630 | 642 |
| |
631 |
| - | |
| 643 | + | |
632 | 644 |
| |
633 | 645 |
| |
634 | 646 |
| |
| |||
665 | 677 |
| |
666 | 678 |
| |
667 | 679 |
| |
| 680 | + | |
668 | 681 |
| |
669 |
| - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
670 | 703 |
| |
671 | 704 |
| |
672 | 705 |
| |
| |||
853 | 886 |
| |
854 | 887 |
| |
855 | 888 |
| |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
856 | 912 |
| |
857 |
| - | |
858 |
| - | |
859 |
| - | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
860 | 916 |
| |
861 |
| - | |
862 | 917 |
| |
863 | 918 |
| |
864 | 919 |
| |
|
Lines changed: 46 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 |
| |
22 | 25 |
| |
23 | 26 |
| |
| |||
1290 | 1293 |
| |
1291 | 1294 |
| |
1292 | 1295 |
| |
1293 |
| - | |
| 1296 | + | |
1294 | 1297 |
| |
1295 | 1298 |
| |
1296 | 1299 |
| |
| |||
1335 | 1338 |
| |
1336 | 1339 |
| |
1337 | 1340 |
| |
1338 |
| - | |
1339 |
| - | |
| 1341 | + | |
1340 | 1342 |
| |
1341 |
| - | |
| 1343 | + | |
1342 | 1344 |
| |
1343 | 1345 |
| |
1344 | 1346 |
| |
1345 |
| - | |
| 1347 | + | |
1346 | 1348 |
| |
1347 | 1349 |
| |
1348 | 1350 |
| |
1349 | 1351 |
| |
1350 | 1352 |
| |
1351 | 1353 |
| |
1352 |
| - | |
1353 |
| - | |
| 1354 | + | |
| 1355 | + | |
1354 | 1356 |
| |
1355 | 1357 |
| |
1356 |
| - | |
| 1358 | + | |
1357 | 1359 |
| |
1358 | 1360 |
| |
1359 | 1361 |
| |
1360 |
| - | |
| 1362 | + | |
1361 | 1363 |
| |
1362 | 1364 |
| |
1363 | 1365 |
| |
| |||
1555 | 1557 |
| |
1556 | 1558 |
| |
1557 | 1559 |
| |
1558 |
| - | |
| 1560 | + | |
1559 | 1561 |
| |
1560 | 1562 |
| |
1561 |
| - | |
1562 |
| - | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
1563 | 1596 |
| |
1564 | 1597 |
| |
1565 | 1598 |
| |
1566 | 1599 |
| |
1567 | 1600 |
| |
1568 | 1601 |
| |
| 1602 | + | |
1569 | 1603 |
| |
1570 | 1604 |
| |
1571 | 1605 |
| |
|
Lines changed: 26 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
540 | 540 |
| |
541 | 541 |
| |
542 | 542 |
| |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
543 | 559 |
| |
544 | 560 |
| |
545 | 561 |
| |
| |||
1304 | 1320 |
| |
1305 | 1321 |
| |
1306 | 1322 |
| |
1307 |
| - | |
1308 |
| - | |
1309 |
| - | |
1310 |
| - | |
1311 |
| - | |
1312 |
| - | |
1313 |
| - | |
1314 |
| - | |
1315 |
| - | |
1316 |
| - | |
1317 | 1323 |
| |
1318 | 1324 |
| |
1319 | 1325 |
| |
| |||
4816 | 4822 |
| |
4817 | 4823 |
| |
4818 | 4824 |
| |
| 4825 | + | |
| 4826 | + | |
| 4827 | + | |
| 4828 | + | |
| 4829 | + | |
| 4830 | + | |
| 4831 | + | |
| 4832 | + | |
| 4833 | + | |
| 4834 | + | |
4819 | 4835 |
| |
4820 | 4836 |
| |
4821 | 4837 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
218 | 218 |
| |
219 | 219 |
| |
220 | 220 |
| |
221 |
| - | |
| 221 | + | |
| 222 | + | |
222 | 223 |
| |
223 | 224 |
| |
224 | 225 |
| |
|
0 commit comments
Comments
(0)