作者
digoal
日期
2022-01-25
标签
PostgreSQL , pg_basebackup
pg_basebackup 增强, 支持DB端压缩和压缩比选项. 此前已支持client compress:
《PostgreSQL 15 preview - pg_basebackup 增强, 支持客户端压缩和压缩比选项》
服务端压缩, 可以节省网络传输量.
https://www.postgresql.org/docs/devel/app-pgbasebackup.html
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=0ad8032910d5eb8efd32867c45b6a25c85e60f50
Server-side gzip compression.
author Robert Haas <rhaas@postgresql.org>
Mon, 24 Jan 2022 20:13:18 +0000 (15:13 -0500)
committer Robert Haas <rhaas@postgresql.org>
Mon, 24 Jan 2022 20:13:18 +0000 (15:13 -0500)
commit 0ad8032910d5eb8efd32867c45b6a25c85e60f50
tree d9ee96a9a1634fb6d3d9e3de37b17a132bfc1eca tree
parent aa01051418f10afbdfa781b8dc109615ca785ff9 commit | diff
Server-side gzip compression.
pg_basebackup's --compression option now lets you write either
"client-gzip" or "server-gzip" instead of just "gzip" to specify
where the compression should be performed. If you write simply
"gzip" it's taken to mean "client-gzip" unless you also use
--target, in which case it is interpreted to mean "server-gzip",
because that's the only thing that makes any sense in that case.
To make this work, the BASE_BACKUP command now takes new
COMPRESSION and COMPRESSION_LEVEL options.
At present, pg_basebackup cannot decompress .gz files, so
server-side compression will cause a failure if (1) -Ft is not
used or (2) -R is used or (3) -D- is used without --no-manifest.
Along the way, I removed the information message added by commit
5c649fe153367cdab278738ee4aebbfd158e0546 which occurred if you
specified no compression level and told you that the default level
had been used instead. That seemed like more output than most
people would want.
Also along the way, this adds a check to the server for
unrecognized base backup options. This repairs a bug introduced
by commit 0ba281cb4bf9f5f65529dfa4c8282abb734dd454.
This commit also adds some new test cases for pg_verifybackup.
They take a server-side backup with and without compression, and
then extract the backup if we have the OS facilities available
to do so, and then run pg_verifybackup on the extracted
directory. That is a good test of the functionality added by
this commit and also improves test coverage for the backup target
patch (commit 3500ccc39b0dadd1068a03938e4b8ff562587ccc) and for
pg_verifybackup itself.
Patch by me, with a bug fix by Jeevan Ladhe. The patch set of which
this is a part has also had review and/or testing from Tushar Ahuja,
Suraj Kharage, Dipesh Pandit, and Mark Dilger.
Discussion: http://postgr.es/m/CA+Tgmoa-ST7fMLsVJduOB7Eub=2WjfpHS+QxHVEpUoinf4bOSg@mail.gmail.com
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=d45099425eb19e420433c9d81d354fe585f4dbd6
Allow server-side compression to be used with -Fp.
author Robert Haas <rhaas@postgresql.org>
Fri, 28 Jan 2022 13:41:25 +0000 (08:41 -0500)
committer Robert Haas <rhaas@postgresql.org>
Fri, 28 Jan 2022 13:41:25 +0000 (08:41 -0500)
commit d45099425eb19e420433c9d81d354fe585f4dbd6
tree c89a27a8d97269b172433071b18b93dcda6b991e tree
parent 43f33dc018a4b77ced78a0a6df8ed5d450cfe5f4 commit | diff
Allow server-side compression to be used with -Fp.
If you have a low-bandwidth connection between the client and the
server, it's reasonable to want to compress on the server side but
then decompress and extract the backup on the client side. This
commit allows you do to do just that.
Dipesh Pandit, with minor and mostly cosmetic changes by me.
Discussion: http://postgr.es/m/CAN1g5_HiSh8ajUMd4ePtGyCXo89iKZTzaNyzP_qv1eJbi4YHXA@mail.gmail.com
期望 PostgreSQL 增加什么功能?
PolarDB for PostgreSQL云原生分布式开源数据库
PostgreSQL 解决方案集合
德哥 / digoal's github - 公益是一辈子的事.

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




