gms_compress
opengauss · openGauss compression utilities for RAW and BLOB values
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102057 | gms_compress | opengauss | 1.0 | UTIL | MulanPSL-2.0 | C++ |
Usage
Sources:
gms_compress 1.0 provides zlib-backed compression and decompression of RAW and BLOB values in openGauss. Its SQL uses kernel-specific types and PACKAGE syntax; it is not a stock PostgreSQL compatibility claim. Official openGauss builds include the module.
Core Workflow
Install with a role permitted to create extensions in the chosen openGauss database:
The extension creates the fixed gms_compress schema. Compression quality ranges from 1 through 9 and defaults to 6. Single-call overloads return a compressed or decompressed value; procedure overloads also expose output parameters.
Streaming Interface
lz_compress_openstarts a context and returns an integer handle.lz_compress_addfeeds a RAW chunk;lz_compress_closefinishes the compressed BLOB and closes the context.lz_uncompress_openaccepts a compressed BLOB;lz_uncompress_extractretrieves the decompressed RAW value;lz_uncompress_closecloses the context.isopenchecks whether a handle is active. These functions and procedures are in the extension’s schema.
Limits and Maintenance
At most five compression/decompression handles can be used, and each handle’s data is limited to 1 GiB. Close contexts when finished and do not retain handles as persistent application identifiers. The streaming compressor’s destination argument on its add procedure exists for syntax compatibility and does not carry state in the current implementation. This module handles RAW/BLOB values, not transparent table compression. Check the matching openGauss distribution when upgrading; no PostgreSQL-major support matrix is inferred from its ancestry.