Analytic column storage for PostgreSQL, built as a native 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 is for
analytic workloads: large scans, aggregates, and column projections over
append-mostly data.
pgColumnar builds from one source tree on PostgreSQL 15 through 18, with 19
validated against 19beta2, and is
licensed under the MIT License. It is pre-release; the version marker
is 1.0-dev, recorded in VERSION. A table USING pgcolumnar is stored in the
native on-disk format, PGCN v1.
The full documentation is published at
jdatcmd.github.io/pgcolumnar. The
same pages are in this repository under docs/:
| Features | What pgColumnar provides |
| Installation | Build, load, and create the extension |
| User guide | Create tables, load data, and query |
| Administration | Operate columnar tables in production |
| Configuration | Settings and per-table options |
| SQL reference | The pgcolumnar.* functions |
| Limitations | Compatibility and known constraints |
| Benchmarks | Size and latency numbers |
| Testing | The test suite and version matrix |
| Changelog | Notable changes |
| Architecture | Source map for developers |
Build with PGXS against the target server, add the library to
shared_preload_libraries, and restart:
make PG_CONFIG=/path/to/pg_config
make install PG_CONFIG=/path/to/pg_configshared_preload_libraries = 'pgcolumnar'
Then, in a database:
CREATE EXTENSION pgcolumnar;
CREATE TABLE events (id bigint, ts timestamptz, kind int, payload text)
USING pgcolumnar;
INSERT INTO events
SELECT g, now(), g % 8, 'p' || g
FROM generate_series(1, 1000000) g;
SELECT count(*), avg(kind) FROM events WHERE kind = 3;See the installation guide for requirements and the user guide for loading and querying.
pgColumnar is an independent implementation. It is not derived from the source of any other columnar project. Its on-disk format, its metadata catalog and its SQL interface come from published column-store research and from the open Apache Arrow, Parquet and ORC specifications. They are recorded in design/NATIVE_FORMAT_AND_INTERFACE_SPEC.md. The implementation is built from that specification and the public PostgreSQL API, by the clean-room method described in PROVENANCE.md.
MIT. See LICENSE.