G.1. pgpro_datactl — manage Postgres Pro Standard data files
G.1.1. Overview
The pgpro_datactl utility provides tools for managing Postgres Pro Standard data files, including a module for CFS (Compressed File System) operations. Currently, pgpro_datactl provides the ability to estimate compression ratios for different compression algorithms.
G.1.2. Installation
pgpro_datactl is provided with Postgres Pro Standard as a separate pre-built package pgpro-datactl-std-14 (for the detailed installation instructions, see Chapter 16).
G.1.3. Commands
G.1.3.1. estimate
pgpro_datactl estimate --source=source_path[--log-level=logging_level] [--help]
Estimates the compression ratios for different compression algorithms.
-s=source_path--source=source_pathSpecifies the path to an uncompressed Postgres Pro tablespace directory.
--log-level=logging_levelSets the logging level. Possible values:
debug,info,warning, anderror.
Example of estimating compression for a tablespace:
pgpro_datactl estimate --source /data/tablespace/PG_17_202409081
Example of estimating compression with debug logging:
pgpro_datactl estimate --source /path/to/tablespace --log-level debug
Example output:
Source file or directory: /data/tablespace/PG_17_202409081 Compression ratios and timings: pglz : ratio=1.85, time=12.34 block/ms zlib : ratio=2.41, time=3.21 block/ms lz4 : ratio=1.92, time=45.67 block/ms zstd : ratio=2.58, time=8.91 block/ms Best ratio: "zstd" with 2.58 Best speed: "lz4" with 45.67 block/ms
ratiois the compression ratio (original size / compressed size).timeis the compression speed in blocks per millisecond.
The best algorithm by compression ratio and by speed is displayed at the end.