All Products
Search
Document Center

PolarDB:PolarDB-Tools

Last Updated:Mar 28, 2026

PolarDB-Tools is a suite of client tools for PolarDB for PostgreSQL (Compatible with Oracle), built with Oracle compatibility support. It replaces the standard community PostgreSQL tools on Alibaba Cloud Linux, Rocky Linux, CentOS Stream, and all versions of CentOS.

Use PolarDB-Tools instead of the community versions when managing a PolarDB for PostgreSQL (Compatible with Oracle) cluster. The community versions do not support Oracle compatibility syntax, which causes data loss or errors during backup, restore, and preprocessing operations.

Tools included

All four tools work the same way as their community PostgreSQL counterparts — same commands and flags. The key difference is Oracle compatibility support.

ToolWhat it doesWhy use the PolarDB-Tools version
psqlInteractive client for connecting to PostgreSQLThe community version does not support creating stored procedures. It truncates the SQL string unexpectedly, corrupting the stored procedure definition.
pg_dumpLogical backup of a single database in a clusterThe community version skips Oracle-compatible objects during export, leaving them out of the backup.
pg_restoreRestores backup files created by pg_dump and pg_dumpallThe community version cannot restore Oracle-compatible objects, resulting in an incomplete database.
ecpgEmbedded SQL C preprocessorThe community version cannot process Oracle-compatible syntax, causing transformation errors.

For usage details, refer to the official PostgreSQL documentation for psql, pg_dump, pg_restore, and ecpg.

PolarDB also provides built-in backup and restore options in the console. See Configure a backup policy and Restoration operations.

Version compatibility

Always use the latest version of PolarDB-Tools. Newer versions are backward-compatible with older PolarDB clusters, so upgrading the client does not require a cluster upgrade.

Download and install PolarDB-Tools

Step 1: Download the installation package

Select the package that matches your operating system and processor architecture.

Operating systemglibc versionArchitectureDownload
AliOS 8, Alibaba Cloud Linux 32.32x86PolarDB-Tools-2.0.14.40.0-20251225192324.al8.x86_64.rpm
AliOS 8, Alibaba Cloud Linux 32.32ARMPolarDB-Tools-2.0.14.40.0-20251225192324.al8.aarch64.rpm
Anolis 8, CentOS 8, Rocky 82.28x86PolarDB-Tools-2.0.14.31.0-20250516002749.el8.x86_64.rpm
Anolis 8, CentOS 8, Rocky 82.28ARMPolarDB-Tools-2.0.14.31.0-20250516002749.el8.aarch64.rpm
AliOS 7, ALinux 2, Anolis 7, CentOS 72.17x86PolarDB-Tools-2.0.14.40.0-20251225192324.alios7.x86_64.rpm
AliOS 7, ALinux 2, Anolis 7, CentOS 72.17ARMPolarDB-Tools-2.0.14.40.0-20251225192324.alios7.aarch64.rpm

Step 2: Install the package

Run the following command, replacing the filename with the package you downloaded.

yum install PolarDB-Tools-2.0.14.40.0-20251225192324.alios7.x86_64.rpm

After installation, the tools are available at /u01/polardb_pg_tools/bin/.

To run the tools without specifying the full path, add the directory to your PATH:

export PATH=/u01/polardb_pg_tools/bin:$PATH

To make this change persistent, add the line to your shell profile, such as ~/.bashrc or ~/.bash_profile.