All Products
Search
Document Center

ApsaraDB RDS:DuckDB-based analytical instance

Last Updated:Dec 05, 2025

Running complex reports or analytical queries on your ApsaraDB RDS for PostgreSQL instance consumes significant resources, which can affect the performance and stability of your core business. To address this issue, ApsaraDB RDS for PostgreSQL provides DuckDB-based analytical instances. These instances are designed for analytical workloads and use a separate node for read/write splitting to isolate analytical processing (AP) workloads from online transactional processing (TP) workloads. This significantly improves the efficiency of complex analytical queries without affecting the performance of the primary instance.

Features

A DuckDB-based analytical instance is a special type of read-only instance designed for analytical queries. It has the following features:

  • Read/write splitting and workload isolation: As a separate node, the instance completely isolates resource-intensive analytical queries from the online transactional processing on the primary instance. This ensures that the performance and stability of your core business are not affected.

  • Zero-ETL real-time columnar conversion: Data from the primary instance is synchronized in real time using a combination of physical replication and logical subscription. The data is automatically converted to a columnar storage format. You can also configure synchronization policies for each database.

  • Hybrid row and columnar storage: The instance stores two copies of the data: one in row-based format (original) and one in columnar format (analytical). Columnar acceleration is enabled by default. Complex analytical queries are routed to the columnar engine. If a query cannot be processed by the columnar engine, the system automatically switches to the row-based engine to ensure compatibility. The instance also supports row store compression.

Prerequisites

The primary ApsaraDB RDS for PostgreSQL instance must meet the following requirements to create a DuckDB-based analytical instance:

  • Instance status: Running.

  • Major engine version: ApsaraDB RDS for PostgreSQL 17.0.

  • Edition: High-availability Edition.

  • Billing method: Subscription or pay-as-you-go.

  • Minor engine version: 20250830 or later.

  • Instance parameters: The following parameters must be set as described:

    Set wal_level to logical. Include rds_duckdb in shared_preload_libraries. Set hot_standby_feedback to on. Set max_replication_slots, max_worker_processes, and max_wal_senders to 1024 or greater.

  • The instance is not a disaster recovery instance.

Billing information

A DuckDB-based analytical instance is billed in the same way as a read-only instance. The cost is determined by factors such as the edition, instance type, storage type, and storage capacity. The actual cost is displayed on the purchase page.

Notes

  • After you create a DuckDB-based analytical instance, do not modify the related parameters of the primary instance.

  • If you create multiple DuckDB-based analytical instances for the same primary instance, the columnar storage configurations apply to all of them. For example, the settings that specify which databases are enabled for automatic row-to-column conversion affect all analytic instances.

  • If the primary instance already has columnar acceleration enabled through the rds_duckdb extension, disable this feature on the primary instance after you create the DuckDB-based analytical instance. This ensures complete workload isolation.

  • To ensure query compatibility, the DuckDB-based analytical instance keeps a copy of the data in row-based format. You can compress this row-based data to control storage costs.

Create a DuckDB-based analytical instance

  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select a region. Then, click the ID of the target instance.

  2. On the Basic Information page, in the Instance Distribution area, click Add to the right of DuckDB-based analytical instance.

    image

  3. On the page that appears, a pre-check is performed. After the pre-check passes, click Confirm and Activate.

    If the pre-check fails, click One-click Fix and select a time for the fix on the page that appears. The system automatically configures the dependencies that failed the pre-check. After the fix is applied, click Add to the right of DuckDB-based analytical instance again. On the pre-check page, click Confirm and Activate.

    Important

    If the major engine version of the instance does not meet the requirements, you must manually upgrade the major engine version.

  4. Configure the parameters for the DuckDB-based analytical instance.

    Parameter

    Description

    Billing Method

    • Subscription: Suitable for long-term use (one-time payment).

    • Pay-as-you-go: Suitable for short-term use (hourly payment). You can create a pay-as-you-go DuckDB-based analytical instance first and convert it to a subscription instance after you confirm that it meets your requirements.

    Edition

    • Basic Edition: A single-node DuckDB-based analytical instance that is cost-effective. It is suitable for learning or testing. Fault recovery and restarts take a long time.

    • High-availability Edition (Default): Has a primary node and a secondary node to provide high availability for the DuckDB-based analytical instance. It is suitable for production environments and meets the needs of more than 80% of user scenarios.

    Note

    If you set Edition to High-availability Edition, you must also select the primary node zone, deployment solution (multi-zone or single-zone deployment), and secondary node zone.

    Product Type

    Only Standard Edition is supported.

    For more information, see Product types.

    Zone

    A zone is an independent physical area within a region. There is no significant difference between zones. Compared to a single zone, multiple zones provide zone-level disaster recovery.

    Instance Type

    Only Dedicated instance types are supported. The instance types are the same as the ApsaraDB RDS for PostgreSQL read-only instance types.

    Storage Capacity

    Storage space includes data space, system file space, WAL file space, and transaction file space. The minimum increment for adjusting storage space is 5 GB.

    Note

    The storage space of a DuckDB-based analytical instance cannot be smaller than that of the primary instance. For the storage space of each instance type, see ApsaraDB RDS for PostgreSQL read-only instance types.

  5. Click Next: Instance Configurations and set the following parameters.

    Parameter

    Description

    Network Type

    By default, this is the same as the network type, VPC, and vSwitch of Primary Node of the primary instance.

    Release Protection

    If you set Billing Method to pay-as-you-go, you can enable Release Protection for the instance to prevent it from being accidentally released. For more information, see Enable or disable release protection for an ApsaraDB RDS for PostgreSQL instance.

    Resource Group

    By default, this is the same as the resource group of the primary instance and cannot be changed.

    Time Zone

    By default, this is the same as the time zone of the primary instance.

    SLR Authorization

    No configuration is required. Authorization was granted when you purchased the primary instance.

    Instance Name

    Set a name for the instance for easy management.

  6. Click Next: Confirm Order.

  7. Review the Parameter Configurations. Select the Quantity and Subscription Duration (for subscription instances only). Then, click Confirm Order and complete the payment.

Configure columnar databases

Before you use a DuckDB-based analytical instance, you must specify which databases on the primary ApsaraDB RDS for PostgreSQL instance to convert to columnar storage.

Prerequisites

The primary ApsaraDB RDS for PostgreSQL instance must meet the following requirements:

Procedure

  1. Log on to the ApsaraDB RDS console. In the navigation pane on the left, click Instances. In the top navigation bar, select a region.

  2. In the instance list, find the primary instance (indicated by the image icon) and expand its drop-down list.

  3. Click the ID of the DuckDB-based analytical instance.

    image

  4. In the navigation pane on the left, click Database Management.

  5. On the Database Management page, select the databases that you want to automatically convert to columnar storage, and then click Batch Configure Columnar Storage.

  6. In the dialog box that appears, click OK.

References