This topic describes the components of PolarDB-Tools and how to download and install PolarDB-Tools.
Usage
PolarDB-Tools is a set of client tools for PolarDB. PolarDB-Tools is compatible with Linux operating systems, including Alibaba Cloud Linux, Rocky Linux, CentOS Stream, and CentOS. The following table describes the tools in PolarDB-Tools.
psql: a client that is used to connect to a PostgreSQL database.
For more information, see psql on the PostgreSQL official website.
pg_dump: a tool used to back up a PostgreSQL database. You can use this tool to back up a database in a cluster.
For more information, see pg_dump on the PostgreSQL official website.
pg_restore: a tool used to restore a PostgreSQL database from backup files that are created by using the pg_dump or pg_dumpall tool.
For more information, see pg_restore on the PostgreSQL official website.
ecpg: an embedded SQL preprocessor for C programs.
For more information, see ecpg on the PostgreSQL official website.
pg_repack: a client used to reclaim tablespaces.
For more information, see pg_repack.
Only the pg_repack tool is provided by PolarDB. You can use the community edition of the psql, pg_dump, and pg_restore tools.
If you need to execute only simple SQL statements to manage PolarDB clusters, you can use the psql community edition. Take note that the community edition of the psql tool does not allow you to create stored procedures. If you use the community edition of the psql tool to create stored procedures, SQL statements may be unexpectedly truncated.
To use the psql, pg_dump, or pg_restore tool, you can directly download the latest version of PolarDB-Tools. The latest version is compatible with older versions.
The version of the pg_repack client must be the same on the client and server sides. When you use the pg_repack client, download the version of PolarDB-Tools that matches the version of the client.
Download and installation
Download the PolarDB-Tools installation package. The following table lists the download links for different operating system versions.
PolarDB database engine
Operating system version
Processor architecture
PolarDB minor database engine version
pg_repack version
PolarDB-Tools version
PolarDB-Tools installation package
PostgreSQL 15
AliOS 8/
ALinux 3/
Anolis 8/
CentOS 8
X86
15.7.2.0
1.5.1-1
20240815
ARM
15.7.2.0
1.5.1-1
20240815
AliOS 7/
ALinux 2/
Anolis 7/
CentOS 7
X86
15.7.2.0
1.5.1-1
20240815
ARM
15.7.2.0
1.5.1-1
20240815
PostgreSQL 14
AliOS 8/
ALinux 3/
Anolis 8/
CentOS 8
X86
14.13.26.0
1.5.1-1
20241030
14.12.23.1
1.5.1
20240801
14.11.21.0
1.5.0-2
20240530
14.10.20.0
1.5.0-1
20240430
ARM
14.13.26.0
1.5.1-1
20241030
14.12.23.1
1.5.1
20240801
14.11.21.0
1.5.0-2
20240530
14.10.20.0
1.5.0-1
20240430
AliOS 7/
ALinux 2/
Anolis 7/
CentOS 7
X86
14.13.26.0
1.5.1-1
20241030
14.12.23.1
1.5.1
20240801
14.11.21.0
1.5.0-2
20240530
14.10.20.0
1.5.0-1
20240430
ARM
14.13.26.0
1.5.1-1
20241030
14.12.23.1
1.5.1
20240801
14.11.21.0
1.5.0-2
20240530
14.10.20.0
1.5.0-1
20240430
Run the following installation command.
yum install PolarDB-Tools-2.0.14.10.0-20230622222102.al8.x86_64.rpm
NoteReplace the sample name used in the preceding command with the name of the installation package that you download.
After the installation package is installed, the tools in PolarDB-Tools appear in the
/u01/polardb_pg_tools/bin/
directory of the system.