pg_analytics
Postgres for analytics, powered by DuckDB
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_analytics | 0.3.7 | OLAP | PostgreSQL | Rust |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 2420 | pg_analytics | No | Yes | No | Yes | Yes | No | paradedb |
| Related | pg_duckdb pg_mooncake duckdb_fdw pg_parquet columnar citus_columnar orioledb citus |
|---|
archived, no longer maintained
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.3.7 | 1817161514 | pg_analytics | - |
| RPM | PIGSTY | 0.3.7 | 1817161514 | pg_analytics_$v | - |
| DEB | PIGSTY | 0.3.7 | 1817161514 | postgresql-$v-pg-analytics | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY MISS | PIGSTY 0.3.7 el8.x86_64.pg17 : pg_analytics_17 pg_analytics_17-0.3.7-1PARADEDB.el8.x86_64.rpm
| PIGSTY 0.3.7 el8.x86_64.pg16 : pg_analytics_16 pg_analytics_16-0.3.7-1PARADEDB.el8.x86_64.rpm
| PIGSTY 0.3.7 el8.x86_64.pg15 : pg_analytics_15 pg_analytics_15-0.3.7-1PARADEDB.el8.x86_64.rpm
| PIGSTY 0.3.7 el8.x86_64.pg14 : pg_analytics_14 pg_analytics_14-0.3.7-1PARADEDB.el8.x86_64.rpm
|
| el8.aarch64 | PIGSTY MISS | PIGSTY 0.3.7 el8.aarch64.pg17 : pg_analytics_17 pg_analytics_17-0.3.7-1PARADEDB.el8.aarch64.rpm
| PIGSTY 0.3.7 el8.aarch64.pg16 : pg_analytics_16 pg_analytics_16-0.3.7-1PARADEDB.el8.aarch64.rpm
| PIGSTY 0.3.7 el8.aarch64.pg15 : pg_analytics_15 pg_analytics_15-0.3.7-1PARADEDB.el8.aarch64.rpm
| PIGSTY 0.3.7 el8.aarch64.pg14 : pg_analytics_14 pg_analytics_14-0.3.7-1PARADEDB.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY MISS | PIGSTY 0.3.7 el9.x86_64.pg17 : pg_analytics_17 pg_analytics_17-0.3.7-1PARADEDB.el9.x86_64.rpm
| PIGSTY 0.3.7 el9.x86_64.pg16 : pg_analytics_16 pg_analytics_16-0.3.7-1PARADEDB.el9.x86_64.rpm
| PIGSTY 0.3.7 el9.x86_64.pg15 : pg_analytics_15 pg_analytics_15-0.3.7-1PARADEDB.el9.x86_64.rpm
| PIGSTY 0.3.7 el9.x86_64.pg14 : pg_analytics_14 pg_analytics_14-0.3.7-1PARADEDB.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY MISS | PIGSTY 0.3.7 el9.aarch64.pg17 : pg_analytics_17 pg_analytics_17-0.3.7-1PARADEDB.el9.aarch64.rpm
| PIGSTY 0.3.7 el9.aarch64.pg16 : pg_analytics_16 pg_analytics_16-0.3.7-1PARADEDB.el9.aarch64.rpm
| PIGSTY 0.3.7 el9.aarch64.pg15 : pg_analytics_15 pg_analytics_15-0.3.7-1PARADEDB.el9.aarch64.rpm
| PIGSTY 0.3.7 el9.aarch64.pg14 : pg_analytics_14 pg_analytics_14-0.3.7-1PARADEDB.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el10.aarch64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| d12.x86_64 | PIGSTY MISS | PIGSTY 0.3.7 d12.x86_64.pg17 : postgresql-17-pg-analytics postgresql-17-pg-analytics_0.3.7_amd64.deb
| PIGSTY 0.3.7 d12.x86_64.pg16 : postgresql-16-pg-analytics postgresql-16-pg-analytics_0.3.7_amd64.deb
| PIGSTY 0.3.7 d12.x86_64.pg15 : postgresql-15-pg-analytics postgresql-15-pg-analytics_0.3.7_amd64.deb
| PIGSTY 0.3.7 d12.x86_64.pg14 : postgresql-14-pg-analytics postgresql-14-pg-analytics_0.3.7_amd64.deb
|
| d12.aarch64 | PIGSTY MISS | PIGSTY 0.3.7 d12.aarch64.pg17 : postgresql-17-pg-analytics postgresql-17-pg-analytics_0.3.7_arm64.deb
| PIGSTY 0.3.7 d12.aarch64.pg16 : postgresql-16-pg-analytics postgresql-16-pg-analytics_0.3.7_arm64.deb
| PIGSTY 0.3.7 d12.aarch64.pg15 : postgresql-15-pg-analytics postgresql-15-pg-analytics_0.3.7_arm64.deb
| PIGSTY 0.3.7 d12.aarch64.pg14 : postgresql-14-pg-analytics postgresql-14-pg-analytics_0.3.7_arm64.deb
|
| d13.x86_64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| d13.aarch64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| u22.x86_64 | PIGSTY MISS | PIGSTY 0.3.7 u22.x86_64.pg17 : postgresql-17-pg-analytics postgresql-17-pg-analytics_0.3.7_amd64.deb
| PIGSTY 0.3.7 u22.x86_64.pg16 : postgresql-16-pg-analytics postgresql-16-pg-analytics_0.3.7_amd64.deb
| PIGSTY 0.3.7 u22.x86_64.pg15 : postgresql-15-pg-analytics postgresql-15-pg-analytics_0.3.7_amd64.deb
| PIGSTY 0.3.7 u22.x86_64.pg14 : postgresql-14-pg-analytics postgresql-14-pg-analytics_0.3.7_amd64.deb
|
| u22.aarch64 | PIGSTY MISS | PIGSTY 0.3.7 u22.aarch64.pg17 : postgresql-17-pg-analytics postgresql-17-pg-analytics_0.3.7_arm64.deb
| PIGSTY 0.3.7 u22.aarch64.pg16 : postgresql-16-pg-analytics postgresql-16-pg-analytics_0.3.7_arm64.deb
| PIGSTY 0.3.7 u22.aarch64.pg15 : postgresql-15-pg-analytics postgresql-15-pg-analytics_0.3.7_arm64.deb
| PIGSTY 0.3.7 u22.aarch64.pg14 : postgresql-14-pg-analytics postgresql-14-pg-analytics_0.3.7_arm64.deb
|
| u24.x86_64 | PIGSTY MISS | PIGSTY 0.3.7 u24.x86_64.pg17 : postgresql-17-pg-analytics postgresql-17-pg-analytics_0.3.7_amd64.deb
| PIGSTY 0.3.7 u24.x86_64.pg16 : postgresql-16-pg-analytics postgresql-16-pg-analytics_0.3.7_amd64.deb
| PIGSTY 0.3.7 u24.x86_64.pg15 : postgresql-15-pg-analytics postgresql-15-pg-analytics_0.3.7_amd64.deb
| PIGSTY 0.3.7 u24.x86_64.pg14 : postgresql-14-pg-analytics postgresql-14-pg-analytics_0.3.7_amd64.deb
|
| u24.aarch64 | PIGSTY MISS | PIGSTY 0.3.7 u24.aarch64.pg17 : postgresql-17-pg-analytics postgresql-17-pg-analytics_0.3.7_arm64.deb
| PIGSTY 0.3.7 u24.aarch64.pg16 : postgresql-16-pg-analytics postgresql-16-pg-analytics_0.3.7_arm64.deb
| PIGSTY 0.3.7 u24.aarch64.pg15 : postgresql-15-pg-analytics postgresql-15-pg-analytics_0.3.7_arm64.deb
| PIGSTY 0.3.7 u24.aarch64.pg14 : postgresql-14-pg-analytics postgresql-14-pg-analytics_0.3.7_arm64.deb
|
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;
This extension is archived (Mar 2025) and no longer maintained. ParadeDB’s analytics work is now part of pg_search. Consider using pg_duckdb or pg_mooncake for data lake analytics instead.
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;
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.