Page-level data compression

PGLZ compression of individual values is used now in PostgreSQL. That’s good, but sometimes it’s possible to achieve significant compression only when compressing multiple values together. This is why we’re considering page-level data compression.

 The important properties of compressed pages which allow to operate with them normally are:

  1. Decompression of a single page item shouldn’t require decompression of the whole page;
  2. Deletion of a page item shouldn’t increase the compressed page size;
  3. Update of an item header shouldn’t increase the compressed page size.

In order to fit those requirements, we propose to compress each item of the page independently but with common dictionary leaving item headers uncompressed.