作者
digoal
日期
2020-03-24
标签
PostgreSQL , pg_cryogen , 压缩 , 存储引擎 , lz4 , zstd
背景
Compressed append-only pluggable storage for PostgreSQL 12+
https://github.com/adjust/pg_cryogen
pg_cryogen implements pluggable storage API and hence requires PostgreSQL 12 or later. To use it as a storage it needs to be specified as an access method while creating a table. E.g.:
create extension pg_cryogen;
create table my_table (...) using pg_cryogen;
pg_cryogen is an append only storage meaning that only INSERT and COPY commands are supported for data modification. Due to specifics of current implementation only inserts to a single table per transaction are possible. Also storage is optimized for bulk inserts and will create at least one separate block for each INSERT/COPY command.
Both index scan and bitmap scans are implemented.
当前每个事务仅支持一个表, 仅支持insert , copy, 每条sql至少产生一个block, 所以最好批量写入, 否则存储就有膨胀了.
类似greenplum appendonly table.
PostgreSQL 许愿链接
您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.