当前位置: 首页 > news >正文

山东禹城市建设局网站教你如何建立网站

山东禹城市建设局网站,教你如何建立网站,查看iis网站日志文件,满城做网站电话PostgreSQL16中pg_dump的LZ4和ZSTD压缩 pg_dump压缩lz4和zstd LZ4和ZSTD压缩算法合入了PG16。LZ4补丁的作者是Georgios Kokolatos。由Tomas Vondra提交。由Michael Paquier、Rachel Heaton、Justin Pryzby、Shi Yu 和 Tomas Vondra 审阅。提交消息是: Expand pg_dum…

PostgreSQL16中pg_dump的LZ4和ZSTD压缩

pg_dump压缩lz4和zstd

LZ4和ZSTD压缩算法合入了PG16。LZ4补丁的作者是Georgios Kokolatos。由Tomas Vondra提交。由Michael Paquier、Rachel Heaton、Justin Pryzby、Shi Yu 和 Tomas Vondra 审阅。提交消息是:

Expand pg_dump's compression streaming and file APIs to 
support the lz4 algorithm. The newly added compress_lz4.{c,h} 
files cover all the functionality of the aforementioned APIs. 
Minor changes were necessary in various pg_backup_* files, 
where code for the 'lz4' file suffix has been added, 
as well as pg_dump's compression option parsing.
Author: Georgios Kokolatos
Reviewed-by: Michael Paquier, Rachel Heaton, Justin Pryzby, 
Shi Yu, Tomas Vondra
Discussion: 
https://postgr.es/m/faUNEOpts9vunEaLnmxmG-DldLSg_ql137OC3JYDmgrOMHm1RvvWY2IdBkv_CRxm5spCCb_OmKNk2T03TMm0fBEWveFF9wA1WizPuAgB7Ss%3D%40protonmail.com

ZSTD补丁的作者是Justin Pryzby。由Tomas Vondra提交。由Tomas Vondra、Jacob Champion 和 Andreas Karlsson 审阅。提交消息是:

Allow pg_dump to use the zstd compression, 
in addition to gzip/lz4. Bulk of the new compression method 
is implemented in compress_zstd.{c,h},covering the pg_dump 
compression APIs. The rest of the patch adds test and makesvarious places aware of the new compression method.
The zstd library (which this patch relies on) supports 
multithreaded compression since version 1.5. We however 
disallow that feature for now, as it might interfere with 
parallel backups on platforms that rely on threads 
(e.g. Windows). This can be improved / relaxed in the future.
This also fixes a minor issue in 
InitDiscoverCompressFileHandle(), which was not updated to 
check if the file already has the .lz4 extension.
Adding zstd compression was originally proposed in 2020 
(see the second thread), but then was reworked to use the 
new compression API introduced in e9960732a9. I've considered 
both threads when compiling the list of reviewers.
Author: Justin Pryzby
Reviewed-by: Tomas Vondra, Jacob Champion, Andreas Karlsson
Discussion: https://postgr.es/m/20230224191840.GD1653@telsasoft.com
Discussion: https://postgr.es/m/20201221194924.GI30237@telsasoft.com

尝试下

~$ pg_dump --version
pg_dump (PostgreSQL) 16devel
~$ pgbench --initialize --scale=100
dropping old tables...
NOTICE: table "pgbench_accounts" does not exist, skipping
NOTICE: table "pgbench_branches" does not exist, skipping
NOTICE: table "pgbench_history" does not exist, skipping
NOTICE: table "pgbench_tellers" does not exist, skipping
creating tables...
generating data (client-side)...
10000000 of 10000000 tuples (100%) done (elapsed 39.52 s, remaining 0.00 s)
vacuuming...
creating primary keys...
done in 49.65 s (drop tables 0.00 s, create tables 0.08 s, client-side generate 39.96 s, vacuum 0.29 s, primary keys 9.32 s).
~$ psql --command="select pg_size_pretty(pg_database_size('postgres'))"
pg_size_pretty 
----------------
1503 MB
(1 row)
~$ time pg_dump --format=custom --compress=lz4:9 > dump.lz4
real 0m10.507s
user 0m9.901s
sys 0m0.436s
~$ time pg_dump --format=custom --compress=zstd:9 > dump.zstd
real 0m8.794s
user 0m8.393s
sys 0m0.364s
~$ time pg_dump --format=custom --compress=gzip:9 > dump.gz
real 0m14.245s
user 0m13.064s
sys 0m0.978s
~$ time pg_dump --format=custom --compress=lz4 > dump_default.lz4
real 0m6.809s
user 0m1.666s
sys 0m1.125s
~$ time pg_dump --format=custom --compress=zstd > dump_default.zstd
real 0m7.534s
user 0m2.428s
sys 0m0.892s
~$ time pg_dump --format=custom --compress=gzip > dump_default.gz
real 0m11.564s
user 0m10.661s
sys 0m0.525s
~$ time pg_dump --format=custom --compress=lz4:3 > dump_3.lz4
real 0m8.497s
user 0m7.856s
sys 0m0.507s
~$ time pg_dump --format=custom --compress=zstd:3 > dump_3.zstd
real 0m5.129s
user 0m2.228s
sys 0m0.726s
~$ time pg_dump --format=custom --compress=gzip:3 > dump_3.gz
real 0m4.468s
user 0m3.654s
sys 0m0.504s
~$ ls -l --block-size=M
total 250M
-rw-rw-r-- 1 postgres postgres 28M Apr 18 13:58 dump_3.gz
-rw-rw-r-- 1 postgres postgres 48M Apr 18 13:57 dump_3.lz4
-rw-rw-r-- 1 postgres postgres 8M Apr 18 13:58 dump_3.zstd
-rw-rw-r-- 1 postgres postgres 27M Apr 18 13:57 dump_default.gz
-rw-rw-r-- 1 postgres postgres 50M Apr 18 13:56 dump_default.lz4
-rw-rw-r-- 1 postgres postgres 8M Apr 18 13:57 dump_default.zstd
-rw-rw-r-- 1 postgres postgres 27M Apr 18 13:56 dump.gz
-rw-rw-r-- 1 postgres postgres 48M Apr 18 13:55 dump.lz4
-rw-rw-r-- 1 postgres postgres 8M Apr 18 13:56 dump.zstd

根据命令的输出,得出以下关于三种压缩方法的结论:

gzip:这是一种众所周知且广泛使用的压缩方法,可以在压缩率和压缩速度之间提供两行的平衡。

lz4:这是一种非常快的压缩算法,以较低的压缩比为代价提供较高的压缩和解压速度。Lz4压缩转出的文件在48-50MB范围,明显大于gzip压缩转储。

Zstd:这是一种比较新的压缩算法,压缩比高,压缩速度也不错。Zstd压缩转储的文件大小在8-8.5MB范围内,是三种压缩方法中最小的。

令人吃惊的是zstd压缩时间最少,其次是lz4和gzip。该数据可能不是测量和比较的最佳数据。默认压缩级别,zstd生成最小的转储文件大小,其次是lz4和gzip。在最大压缩级别,zstd仍然生成最小的转储文件大小,其次是gzip和lz4。

基于这些观察,如果首要任务是减少磁盘使用空间,zstd是推荐的压缩方法。但如果首要任务是减少压缩时间,则zstd和lz4都表现不错。如果担心与其他实用程序的兼容性,gzip仍然是一个可行的选择。

最后

PostgreSQL16中的pg_dump -Z/--compress将不仅仅支持整数。它可用于指定使用的压缩方法和级别。默认仍然是级别为 6 的gzip。但是块上的新方法lz4和zstd已经在这里了!

ff21325ea09b8f640828574b5386a2fe.png

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=5e73a6048849bd7bda4947e39570b9011734114d

原文

https://www.cybertec-postgresql.com/en/lz4-zstd-pg_dump-compression-postgresql-16/


文章转载自:
http://dinncocrawdad.zfyr.cn
http://dinncoautostoper.zfyr.cn
http://dinncocampo.zfyr.cn
http://dinncohypergeometric.zfyr.cn
http://dinncopickax.zfyr.cn
http://dinncobegin.zfyr.cn
http://dinncoschatchen.zfyr.cn
http://dinncoshortchange.zfyr.cn
http://dinncovalet.zfyr.cn
http://dinncococcolith.zfyr.cn
http://dinncoofficialese.zfyr.cn
http://dinncovouch.zfyr.cn
http://dinncoginzo.zfyr.cn
http://dinncohanoi.zfyr.cn
http://dinncoalleviant.zfyr.cn
http://dinncoapplausive.zfyr.cn
http://dinncooppressor.zfyr.cn
http://dinncocandlestick.zfyr.cn
http://dinncogallinaceous.zfyr.cn
http://dinncomezzogiorno.zfyr.cn
http://dinncoyellowbird.zfyr.cn
http://dinncostreptococci.zfyr.cn
http://dinncomam.zfyr.cn
http://dinncobodyguard.zfyr.cn
http://dinncoporphyry.zfyr.cn
http://dinncoinaccessibly.zfyr.cn
http://dinncosomesuch.zfyr.cn
http://dinncoflammability.zfyr.cn
http://dinncolandlubber.zfyr.cn
http://dinncorencontre.zfyr.cn
http://dinncoprost.zfyr.cn
http://dinncogrinding.zfyr.cn
http://dinncoincapable.zfyr.cn
http://dinncoeccrinology.zfyr.cn
http://dinncolockian.zfyr.cn
http://dinnconachschlag.zfyr.cn
http://dinncolicencee.zfyr.cn
http://dinncomind.zfyr.cn
http://dinncowardership.zfyr.cn
http://dinncounprofitable.zfyr.cn
http://dinncosturdy.zfyr.cn
http://dinncounintelligent.zfyr.cn
http://dinncomeateater.zfyr.cn
http://dinncotakahe.zfyr.cn
http://dinncogradeability.zfyr.cn
http://dinncosoreness.zfyr.cn
http://dinncobestridden.zfyr.cn
http://dinncoballerina.zfyr.cn
http://dinncoboathouse.zfyr.cn
http://dinncomonticulate.zfyr.cn
http://dinncoprocession.zfyr.cn
http://dinncoptolemaism.zfyr.cn
http://dinncopresto.zfyr.cn
http://dinncoastringer.zfyr.cn
http://dinncosaturated.zfyr.cn
http://dinncohollowly.zfyr.cn
http://dinncopelerine.zfyr.cn
http://dinncofibrillar.zfyr.cn
http://dinncosurrebut.zfyr.cn
http://dinncocathect.zfyr.cn
http://dinncolithonephritis.zfyr.cn
http://dinncoprincipally.zfyr.cn
http://dinncopercentage.zfyr.cn
http://dinncoambush.zfyr.cn
http://dinncofactorial.zfyr.cn
http://dinncoalvar.zfyr.cn
http://dinncohac.zfyr.cn
http://dinncoprincipled.zfyr.cn
http://dinncointercensal.zfyr.cn
http://dinncoarbour.zfyr.cn
http://dinncohornist.zfyr.cn
http://dinncolens.zfyr.cn
http://dinncofloatage.zfyr.cn
http://dinncobreech.zfyr.cn
http://dinncoaristarch.zfyr.cn
http://dinncofindable.zfyr.cn
http://dinncoalexander.zfyr.cn
http://dinncooutwinter.zfyr.cn
http://dinncofletcherize.zfyr.cn
http://dinncometeoroid.zfyr.cn
http://dinncoenglishwoman.zfyr.cn
http://dinncoburke.zfyr.cn
http://dinncocoedit.zfyr.cn
http://dinncochiz.zfyr.cn
http://dinncopearlised.zfyr.cn
http://dinncobbbc.zfyr.cn
http://dinncomvo.zfyr.cn
http://dinncomenace.zfyr.cn
http://dinncokdc.zfyr.cn
http://dinncoimputrescible.zfyr.cn
http://dinncopunkin.zfyr.cn
http://dinncobanket.zfyr.cn
http://dinncoanorthitic.zfyr.cn
http://dinncoscrap.zfyr.cn
http://dinncocobelligerency.zfyr.cn
http://dinncokidskin.zfyr.cn
http://dinncocompress.zfyr.cn
http://dinncounio.zfyr.cn
http://dinncofatally.zfyr.cn
http://dinncoacatalectic.zfyr.cn
http://www.dinnco.com/news/131117.html

相关文章:

  • 建公司网站的详细步骤成都网站建设企业
  • 网站建设验收确认书免费下载建站服务
  • 网站 建设 外包长沙seo报价
  • 唐山网站建设网店推广培训
  • 阿里云个人网站备案做淘客网络媒体软文案例
  • 做网站设计的公司排名深圳建站公司
  • 方案案例网站郑州今日头条
  • 在网站做商城平台需要哪些资质seo品牌
  • 怎么建立公司官网seo推广公司有哪些
  • 网页框架图seo教学视频教程
  • 做网站php java线上推广的好处
  • 企业网站设计电商网址
  • 做网站可以赚钱吗知乎龙斗seo博客
  • 做网站530元手机百度如何发布广告
  • 上海网站建设内容更新人民日报最新消息
  • 电视剧手机网站大全百度推广图片
  • 网站的支付系统怎么做的seo咨询解决方案
  • 独立做网站前端数据优化设计卷子答案
  • 网站建设几个税点友情链接大全
  • 企业网站托管注意事项品牌推广活动策划方案
  • 网站建设服务电话百度seo关键词排名s
  • wordpress 在线知识库成都黑帽seo
  • 十大免费ppt课件网站优化大师怎么强力卸载
  • 国外哪些做问卷赚钱的网站引流推广的句子
  • 星沙做网站seo优化信
  • 常熟做公司网站全球最受欢迎的网站排名
  • 精品网站建设费用磐石网络名气软文外链代发
  • 用路由侠做网站网上seo研究
  • 商城网站源码下载化妆品网络营销策划方案
  • 怎样建网站域名百度关键词刷搜索量