pg_analytics

Postgres for analytics, powered by DuckDB

Overview

PackageVersionCategoryLicenseLanguage
pg_analytics0.3.7OLAPPostgreSQLRust
IDExtensionBinLibLoadCreateTrustRelocSchema
2420pg_analyticsNoYesNoYesYesNoparadedb
Relatedpg_duckdb pg_mooncake duckdb_fdw pg_parquet columnar citus_columnar orioledb citus

archived, no longer maintained

Version

TypeRepoVersionPG VerPackageDeps
EXTPIGSTY0.3.71817161514pg_analytics-
RPMPIGSTY0.3.71817161514pg_analytics_$v-
DEBPIGSTY0.3.71817161514postgresql-$v-pg-analytics-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64PIGSTY MISS
el8.aarch64PIGSTY MISS
el9.x86_64PIGSTY MISS
el9.aarch64PIGSTY MISS
el10.x86_64PIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISS
el10.aarch64PIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISS
d12.x86_64PIGSTY MISS
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7
d12.aarch64PIGSTY MISS
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7
d13.x86_64PIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISS
d13.aarch64PIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISSPIGSTY MISS
u22.x86_64PIGSTY MISS
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7
u22.aarch64PIGSTY MISS
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7
u24.x86_64PIGSTY MISS
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7
u24.aarch64PIGSTY MISS
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7
PIGSTY 0.3.7

Install

You can install pg_analytics directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:

pig repo add pgsql -u          # Add repo and update cache

Install the extension using pig or apt/yum/dnf:

pig install pg_analytics;          # Install for current active PG version
pig ext install -y pg_analytics -v 17  # PG 17
pig ext install -y pg_analytics -v 16  # PG 16
pig ext install -y pg_analytics -v 15  # PG 15
pig ext install -y pg_analytics -v 14  # PG 14
dnf install -y pg_analytics_17       # PG 17
dnf install -y pg_analytics_16       # PG 16
dnf install -y pg_analytics_15       # PG 15
dnf install -y pg_analytics_14       # PG 14
apt install -y postgresql-17-pg-analytics   # PG 17
apt install -y postgresql-16-pg-analytics   # PG 16
apt install -y postgresql-15-pg-analytics   # PG 15
apt install -y postgresql-14-pg-analytics   # PG 14

Create Extension:

CREATE EXTENSION pg_analytics;

Usage

https://github.com/paradedb/pg_analytics

Example, read parquet files from S3:

CREATE EXTENSION pg_analytics;
CREATE FOREIGN DATA WRAPPER parquet_wrapper HANDLER parquet_fdw_handler VALIDATOR parquet_fdw_validator;

-- Provide S3 credentials
CREATE SERVER parquet_server FOREIGN DATA WRAPPER parquet_wrapper;

-- Create foreign table with auto schema creation
CREATE FOREIGN TABLE trips ()
SERVER parquet_server
OPTIONS (files 's3://paradedb-benchmarks/yellow_tripdata_2024-01.parquet');

-- Success! Now you can query the remote Parquet file like a regular Postgres table
SELECT COUNT(*) FROM trips;
  count
---------
 2964624
(1 row)

This fdw is read-only for now.


Iceberg Support

CREATE EXTENSION pg_analytics;

CREATE FOREIGN DATA WRAPPER iceberg_wrapper
    HANDLER iceberg_fdw_handler
    VALIDATOR iceberg_fdw_validator;

CREATE SERVER iceberg_server
    FOREIGN DATA WRAPPER iceberg_wrapper;

-- Replace the dummy schema with the actual schema
CREATE FOREIGN TABLE iceberg_table (x INT)
    SERVER iceberg_server
    OPTIONS (files 's3://bucket/iceberg_folder');

-- Success! You can now query the Iceberg table
SELECT COUNT(*) FROM iceberg_table;

Last Modified 2026-03-12: add pg extension catalog (95749bf)