作者
digoal
日期
2022-03-31
标签
PostgreSQL , pg_basebackup , client , server , compress , workers
PostgreSQL 15 pg_basebackup 支持zstd 内置并行压缩选项 --compress WHERE-zstd:workers=N , where WHERE is "client" or "server" and N is an integer
采用zstd内置的并行压缩, CPU换时间. 同样支持在client或者server端选择开启压缩.
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=51c0d186d99a18e6aae53003f5138f20991e15a6
Allow parallel zstd compression when taking a base backup.
author Robert Haas <rhaas@postgresql.org>
Wed, 30 Mar 2022 13:35:14 +0000 (09:35 -0400)
committer Robert Haas <rhaas@postgresql.org>
Wed, 30 Mar 2022 13:41:26 +0000 (09:41 -0400)
commit 51c0d186d99a18e6aae53003f5138f20991e15a6
tree 0c37c8899e6448c1bd56919741f58e8e5a99c7b5 tree
parent c6863b85829149e2241faafa161b6c5af1f06cb9 commit | diff
Allow parallel zstd compression when taking a base backup.
libzstd allows transparent parallel compression just by setting
an option when creating the compression context, so permit that
for both client and server-side backup compression. To use this,
use something like pg_basebackup --compress WHERE-zstd:workers=N
where WHERE is "client" or "server" and N is an integer.
When compression is performed on the server side, this will spawn
threads inside the PostgreSQL backend. While there is almost no
PostgreSQL server code which is thread-safe, the threads here are used
internally by libzstd and touch only data structures controlled by
libzstd.
Patch by me, based in part on earlier work by Dipesh Pandit
and Jeevan Ladhe. Reviewed by Justin Pryzby.
Discussion: http://postgr.es/m/CA+Tgmobj6u-nWF-j=FemygUhobhryLxf9h-wJN7W-2rSsseHNA@mail.gmail.com
期望 PostgreSQL 增加什么功能?
PolarDB for PostgreSQL云原生分布式开源数据库
PostgreSQL 解决方案集合
德哥 / digoal's github - 公益是一辈子的事.

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




