Column-oriented storage 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 is for
analytic workloads: large scans, aggregates, and column projections over
append-mostly data.
pgColumnar builds from one source tree on PostgreSQL 15 through 19 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.
| 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. It is built from a functional specification of the on-disk format and SQL interface, recorded in design/FORMAT_AND_INTERFACE_SPEC.md, by the clean-room method described in PROVENANCE.md.
MIT. See LICENSE.