pg_lake_benchmark
pg_lake · Provides ClickBench, TPC-H and TPC-DS data generation and benchmark queries for pg_lake, Iceberg and heap tables.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2568 | pg_lake_benchmark | pg_lake | 3.7 | FEAT | Apache-2.0 | C |
PostgreSQL · 16, 17, 18, 19
| Relationships | |
|---|---|
| Requires | pg_lake |
Usage
Sources:
pg_lake_benchmark supplies ClickBench, TPC-H, and TPC-DS data/query drivers for comparing pg_lake, Iceberg, and ordinary PostgreSQL heap tables. It depends on pg_lake and is intended for controlled benchmark databases, because its generators create large schemas and data sets and its runners discard query results.
Core Workflow
Install the dependency and extension, then choose one benchmark and table type:
Use a dedicated object-store prefix and disposable database. Increasing iteration_count reduces peak memory during large TPC-H generation.
Benchmark APIs
lake_clickbench.create(table_type => ...)andlake_clickbench.load(): create and load the ClickBench table. The load reads an approximately 15 GB Parquet data set from S3.lake_clickbench.show_query(id)andlake_clickbench.run_query(id): inspect or run one of 43 queries.lake_tpch.gen(...),lake_tpch.queries(), andlake_tpch.run_query(id): generate and run the 22-query TPC-H suite.lake_tpcds.gen(...),lake_tpcds.queries(), andlake_tpcds.run_query(id): generate and run the 99-query TPC-DS suite.- Supported
table_typevalues areiceberg,pg_lake, andheap.
Caveats
The run functions execute a query and discard its result, so enable psql timing or capture server-side metrics explicitly. TPC-H and TPC-DS use fixed query parameters, matching the limitation documented by the underlying DuckDB generators; they are not substitute workloads for an application’s parameter distribution.
Data generation can exhaust memory and consume substantial object-storage capacity, bandwidth, and time. Keep scale, credentials, region, caches, concurrency, and server settings identical when comparing results, and do not present a single run as a portable performance guarantee.
Upstream 3.6.0
Upstream 3.6.0 adds PostgreSQL 19 support and uses DuckDB 1.5.6. Deploy matching libraries and pgduck_server, keep pg_extension_base preloaded, restart loaded processes and apply the supplied SQL updates to version 3.6. This component’s 3.5-to-3.6 SQL migration is empty; the matching runtime and its dependencies still need the coordinated release upgrade.
Upstream 3.7.0
The current reviewed release is 3.7.0 and this component’s control version is 3.7. Earlier version sections describe historical behavior and package examples. Upgrade the complete family with matching libraries and pgduck_server, restart processes holding old code, and apply the supplied extension updates to SQL version 3.7. This does not establish package availability.