rds_duckdb
rds_duckdb · Alibaba Cloud RDS PostgreSQL DuckDB analytical acceleration extension
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101139 | rds_duckdb | rds_duckdb | 1.3.2.3 | OLAP | Unknown | C |
PostgreSQL · 13, 14, 15, 16, 17, 18
Usage
Sources:
- Enable DuckDB on an ApsaraDB RDS primary instance
- AP acceleration engine (
rds_duckdb) - DuckDB analysis acceleration overview
rds_duckdb 1.3.2.3 is an Alibaba Cloud ApsaraDB RDS for PostgreSQL extension that maintains DuckDB column-store counterparts of PostgreSQL tables and offloads eligible analytical SELECT queries to DuckDB’s vectorized engine. Use it for scans, joins, and aggregations on an RDS instance; it is not a portable DuckDB extension for community PostgreSQL.
Core Workflow
Enable DuckDB acceleration for the instance in the RDS console. The managed setup configures required instance parameters, including wal_level=logical and shared_preload_libraries containing rds_duckdb, and causes a brief disconnection. Then connect with a privileged account:
Enable offloading for a session or a single statement, and use EXPLAIN to prove that the plan contains Custom Scan (DuckDBScan):
Controls and Observability
rds_duckdb.executionenables or disables query offloading; it is the only setting supported in a statement hint.rds_duckdb.plan_cost_thresholdkeeps low-cost queries on PostgreSQL, avoiding DuckDB forwarding overhead.rds_duckdb.worker_threadsandrds_duckdb.memory_limitbound session-level DuckDB resources.rds_duckdb.enable_fallbackcontrols whether unsupported or unavailable offloads fall back to PostgreSQL; disable it temporarily to expose the reason during troubleshooting.rds_duckdb.wait_sync_timeoutbounds the wait for incremental synchronization.rds_duckdb.duckdb_sync_statreports table synchronization state and errors and requires a privileged account.
Requirements and Caveats
Current provider documentation requires a primary PostgreSQL 13–18 RDS instance at minor engine version 20260130 or later; read-only acceleration and newer features have narrower requirements. The cataloged extension version and the RDS engine minor version are separate identifiers.
Only eligible read-only SELECT statements are offloaded. DML, DDL, unsupported SQL, joins involving non-DuckDB tables, or tables that are not synchronized fall back to PostgreSQL unless fallback is disabled. A synchronized table needs a primary key or suitable replica identity. Columnar replicas consume additional storage and can lag PostgreSQL data; choose consistency and timeout settings deliberately. Availability, restart, recovery, replication, upgrade, and billing behavior remain Alibaba Cloud service concerns.