citusdata/cstore_fdw logo

citusdata/cstore_fdw

Free

Columnar storage extension for Postgres built as a foreign data wrapper. Check out https://github.com/citusdata/citus for a modernized columnar storage implementation built as a table access method.

FreeFree tier
Type
Open Source
Company
Citus Data

About citusdata/cstore_fdw

cstore_fdw is an open-source columnar storage extension for PostgreSQL, implemented as a foreign data wrapper (FDW). It is designed for analytics use cases where data is loaded in batches. By storing data column-by-column rather than row-by-row, cstore_fdw significantly improves query performance for analytical workloads—only reading relevant columns from disk—and achieves 6x–10x data compression, reducing storage requirements for data archival. The extension was developed by Citus Data and can be combined with the Citus extension to distribute queries across multiple PostgreSQL nodes. Note: The columnar storage functionality is now natively available in the Citus extension, which provides a more modern table access method with support for streaming replication, archival, rollback, and simplified upgrades. Users are encouraged to migrate to Citus for ongoing development and better PostgreSQL integration.

Key Features

Columnar storage for PostgreSQL via foreign data wrapper
Reads only relevant columns from disk for analytics queries
6x–10x data compression to reduce storage footprint
Open source, developed by Citus Data
Can be combined with Citus for distributed query execution across multiple nodes
Supports batch loading of data for data warehousing and archival

Pros & Cons

Pros
  • Significant compression (6x–10x) reduces storage costs
  • Faster analytical queries due to columnar storage and selective reads
  • Open source with an active history and community
  • Integrates seamlessly with PostgreSQL as a foreign data wrapper
  • Can be extended with Citus for distributed querying
Cons
  • Deprecated in favor of Citus columnar storage (no new development)
  • Lacks streaming replication and transactional rollback support
  • Migration to Citus required for modern PostgreSQL features
  • Not suitable for OLTP workloads with frequent row-level updates

Best For

Analytics and reporting on large PostgreSQL datasetsData warehousing with compressed, columnar storageData archival to reduce storage costsBatch loading and historical data analysisScaling analytical queries by distributing data with Citus

FAQ

What is cstore_fdw?
cstore_fdw is an open-source columnar storage extension for PostgreSQL implemented as a foreign data wrapper. It provides compression and faster analytics by storing data column-wise.
How does compression compare to Citus columnar?
The README shows a migration example where a 100 MB cstore_fdw table compressed to 64 MB using Citus columnar with zstd compression, implying Citus can achieve even better compression.
Is cstore_fdw still maintained?
Development has shifted to the Citus extension, which provides native columnar storage via a table access method. The GitHub repository recommends migrating to Citus.
How do I migrate from cstore_fdw to Citus columnar?
The README provides a migration example: create a Citus columnar table with the same columns using CREATE TABLE ... USING columnar, then copy data with INSERT INTO ... SELECT. The Citus extension must be installed.