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.
| Tool | What it does | Why use the PolarDB-Tools version |
|---|---|---|
psql | Interactive client for connecting to PostgreSQL | The community version does not support creating stored procedures. It truncates the SQL string unexpectedly, corrupting the stored procedure definition. |
pg_dump | Logical backup of a single database in a cluster | The community version skips Oracle-compatible objects during export, leaving them out of the backup. |
pg_restore | Restores backup files created by pg_dump and pg_dumpall | The community version cannot restore Oracle-compatible objects, resulting in an incomplete database. |
ecpg | Embedded SQL C preprocessor | The 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 system | glibc version | Architecture | Download |
|---|---|---|---|
| AliOS 8, Alibaba Cloud Linux 3 | 2.32 | x86 | PolarDB-Tools-2.0.14.40.0-20251225192324.al8.x86_64.rpm |
| AliOS 8, Alibaba Cloud Linux 3 | 2.32 | ARM | PolarDB-Tools-2.0.14.40.0-20251225192324.al8.aarch64.rpm |
| Anolis 8, CentOS 8, Rocky 8 | 2.28 | x86 | PolarDB-Tools-2.0.14.31.0-20250516002749.el8.x86_64.rpm |
| Anolis 8, CentOS 8, Rocky 8 | 2.28 | ARM | PolarDB-Tools-2.0.14.31.0-20250516002749.el8.aarch64.rpm |
| AliOS 7, ALinux 2, Anolis 7, CentOS 7 | 2.17 | x86 | PolarDB-Tools-2.0.14.40.0-20251225192324.alios7.x86_64.rpm |
| AliOS 7, ALinux 2, Anolis 7, CentOS 7 | 2.17 | ARM | PolarDB-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.rpmAfter 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:$PATHTo make this change persistent, add the line to your shell profile, such as ~/.bashrc or ~/.bash_profile.