Skip to content

pgColumnar documentation

pgColumnar is a column-oriented storage extension for PostgreSQL, implemented as a table access method. A table created USING pgcolumnar stores its data by column, with per-column compression, chunk-group skipping, and a vectorized aggregate path. It targets analytic workloads: large scans, aggregates, and column projections over append-mostly data.

pgColumnar builds from one source tree on PostgreSQL 15 through 19. It is licensed under the MIT License.

Where to start

If you want to Read
See what pgColumnar provides Features
Install the extension and load it into a server Installation
Create columnar tables, load data, and query them User guide
Operate columnar tables in production Administration
Look up a setting and its default Configuration reference
Look up a pgcolumnar.* function SQL reference
Check release status, type coverage, and known constraints Limitations and compatibility
See size and latency numbers Benchmarks
Run the test suite Testing

When to use columnar storage

A columnar table stores each column separately and compresses it. A read that uses a subset of the columns and scans many rows gets a benefit from this. The scan reads and decompresses only the columns that the query asks for. The minimum and maximum of each chunk also let the scan skip the groups of rows that cannot match a filter.

Use pgColumnar for:

  • Fact tables and event logs that are appended to and read with aggregates or wide scans.
  • Queries that select a few columns from a table with many columns.
  • Data that compresses well and is queried more often than it is updated.

Row storage (the default heap) remains the better choice for high-rate single row updates and deletes, and for point lookups that return whole rows. pgColumnar supports updates, deletes, and indexes, but its storage layout is built for append-mostly data. See Limitations and compatibility.

How it fits together

A columnar table is an ordinary PostgreSQL relation. It works with transactions, WAL, replication, indexes, COPY, and pg_dump. The extension adds:

  • A table access method named pgcolumnar. New tables are written in the native on-disk format, PGCN v1.
  • A set of catalog tables and functions in the pgcolumnar schema.
  • Planner and executor paths for columnar scans, aggregates, index-only scans, and projections, controlled by settings under the pgcolumnar. prefix.

Design and internals

The documents above are for users and administrators. The design and format specifications are separate: