Baseshift’s Database Compression V1 (DC1) is a research preview that compresses PostgreSQL storage while preserving independent access to 8 KB blocks and leaving PostgreSQL unmodified. It works through a custom database-focused libc rather than a special filesystem or storage driver. DC1 selects the smallest encoding for each block, combining purpose-built codecs for structures such as indexes and geometry with neural codecs trained on each table’s data. The neural decoders predict many values in parallel, using processor vector instructions to speed reconstruction. This approach targets a core trade-off in database compression: larger blocks improve compression but make individual reads slower.
Across six databases totaling 610 GB, DC1 produced files 57% smaller than Zstandard -3, 48% smaller than Brotli quality 9, and 38% smaller than Zstandard -19 with trained dictionaries, all measured on independent 8 KB blocks. Average decoding took about 0.18 milliseconds per block with AVX-512 VNNI, compared with 1.46 milliseconds using portable C; the added work may be noticeable on local NVMe. Results were especially strong for OpenStreetMap: the US database shrank from 242 GB to 28.7 GB, and New York from 11.14 GB to 1.24 GB. DC1 also beat whole-file Zstandard, xz, and zpaq on the US map, though xz and zpaq led on some other datasets. Docker images containing PostgreSQL 17 and PostGIS are available for both maps; further codec development and integration into snapshot workflows are planned.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.