暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL 15 preview - wal full page write支持lz4压缩

digoal 2021-01-06
321

作者

digoal

日期

2021-06-29

标签

PostgreSQL , fpw , lz4 , compress


背景

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=4035cd5d4eee4dae797bfc77ab07f8dcd8781b41

```
Add support for LZ4 with compression of full-page writes in WAL
author Michael Paquier michael@paquier.xyz
Tue, 29 Jun 2021 02:17:55 +0000 (11:17 +0900)
committer Michael Paquier michael@paquier.xyz
Tue, 29 Jun 2021 02:17:55 +0000 (11:17 +0900)
commit 4035cd5d4eee4dae797bfc77ab07f8dcd8781b41
tree 6f002f0b1f66bd5e6897ad399508060d77b1b874 tree
parent cc2c7d65fc27e877c9f407587b0b92d46cd6dd16 commit | diff
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 compression
used when building a WAL record, and an extra per-record bit is used to
track down if a block is compressed with PGLZ, LZ4 or nothing.

wal_compression, the existing parameter, is changed to an enum with
support 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 be
also an interesting choice, but going just with LZ4 for now makes the
patch minimalistic as toast compression is already able to use LZ4, so
there is no need to worry about any build-related needs for this
implementation.

Author: Andrey Borodin, Justin Pryzby
Reviewed-by: Dilip Kumar, Michael Paquier
Discussion: https://postgr.es/m/3037310D-ECB7-4BF1-AF20-01C10BB33A33@yandex-team.ru
```

PostgreSQL 许愿链接

您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.

9.9元购买3个月阿里云RDS PostgreSQL实例

PostgreSQL 解决方案集合

德哥 / digoal's github - 公益是一辈子的事.

digoal's wechat

文章转载自digoal,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论