Skip to content

kingres_columnar

Experimental compressed columnar table access method for append-only analytics.

kingres · Experimental compressed columnar table access method for append-only analytics.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102354kingres_columnarkingres0.2OLAPAGPL-3.0-onlyC

PostgreSQL · 18, 19

Usage

Sources:

kingres_columnar 0.2 is an append-only columnar table access method for analytics, with compressed stripes, projected and parallel scans, min/max skipping, and B-tree indexes including unique indexes. The reviewed source supports PostgreSQL 18.7 and 19.0 without additional core patches. Validate this preview storage on representative data before relying on it.

Create and Inspect a Table

Preload and restart every writer, standby and restore node: the library registers a WAL resource manager. Restart standbys before a primary begins generating columnar WAL. Installation requires a superuser.

shared_preload_libraries = 'kingres_columnar'
CREATE EXTENSION kingres_columnar;
CREATE TABLE public.events (ts timestamptz, value float8) USING columnar;
CREATE INDEX ON public.events (ts);
SELECT * FROM kingres.columnar_info('public.events');
SELECT * FROM kingres.columnar_check(false);
SELECT kingres.columnar_check_clean();

Storage and Operations

The columnar access method supports none, pglz, lz4 and zstd compression. kingres.columnar_set_options affects future stripes; it is owner-only and nontransactional. kingres.columnar_compact merges small stripes, while kingres.columnar_stripes and kingres.columnar_options expose storage state. Read utilities require SELECT.

B-tree indexes, primary keys and unique constraints are supported. Ordinary UPDATE/DELETE, row locks, foreign keys, non-B-tree indexes, index-only scans, parallel index scans, concurrent index creation/reindexing, temporary and unlogged tables remain unsupported. Compaction can add index entries; vacuum afterward. Parallel table scans do not imply vectorized execution.

Checks, Recovery and Upgrade

kingres.columnar_check(false) examines catalogs, files and headers, not every stored cell. Any result row, including not_checked, means the check was not clean; kingres.columnar_check_clean() supplies the strict Boolean form. On a busy database, inspect the reason and repeat after conflicting DDL ends. Repair mode, kingres.columnar_reconcile and kingres.columnar_check_indexes require superuser privileges; the last checks missing index entries separately.

Once columnar WAL exists, removing the library can prevent recovery. The experimental WAL resource-manager ID is 128. Without preload some existing data is readable, but writes and conversions are refused.

Install the new library before updating from 0.1 to 0.2. The SQL update adds reserved-stripe state without rewriting existing data files. Old format-2 files keep their format until a rewrite; new format-3 files cannot be read by the 0.1 library. Back up and follow the release’s file-format and index prerequisites; a downgrade is not an update path.

Table reader