https://postgrespro.com/docs/enterprise/9.6/cfs-usage
31.3. Using Compression/Encryption
Compression can be enabled for particular tablespaces. System relations are not compressed in any case. It is not currently possible to alter tablespace compression option, i.e. it is not possible to compress existing tablespace or vice versa - decompress compressed tablespace.
So to use compression/encryption you need to create a tablespace with compression=true option. You can make this tablespace your default tablespace - in this case all tables within the current session will be implicitly created in this tablespace:
postgres=# create tablespace zfs location '/var/data/cfs' with (compression=true);
postgres=# set default_tablespace=zfs;
有关的压缩参数如下:
https://postgrespro.com/docs/enterprise/9.6/runtime-config-cfs

本文档详细介绍了如何在PostgreSQL中启用特定表空间的压缩功能,包括创建带有压缩选项的表空间,并将其设置为默认表空间的方法,以及相关的压缩参数说明。
1076

被折叠的 条评论
为什么被折叠?



