All Products
Search
Document Center

PolarDB:PolarDB-Tools

Last Updated:Nov 19, 2024

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.

Note
  • 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

  1. 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

    PolarDB-Tools-2.0.15.2.0-20240805142651.al8.x86_64.rpm

    ARM

    15.7.2.0

    1.5.1-1

    20240815

    PolarDB-Tools-2.0.15.2.0-20240805142651.al8.aarch64.rpm

    AliOS 7/

    ALinux 2/

    Anolis 7/

    CentOS 7

    X86

    15.7.2.0

    1.5.1-1

    20240815

    PolarDB-Tools-2.0.15.2.0-20240805142651.alios7.x86_64.rpm

    ARM

    15.7.2.0

    1.5.1-1

    20240815

    PolarDB-Tools-2.0.15.2.0-20240805142651.alios7.aarch64.rpm

    PostgreSQL 14

    AliOS 8/

    ALinux 3/

    Anolis 8/

    CentOS 8

    X86

    14.13.26.0

    1.5.1-1

    20241030

    PolarDB-Tools-2.0.14.26.0-20241023104506.al8.x86_64.rpm

    14.12.23.1

    1.5.1

    20240801

    PolarDB-Tools-2.0.14.23.1-20240723195433.al8.x86_64.rpm

    14.11.21.0

    1.5.0-2

    20240530

    PolarDB-Tools-2.0.14.21.0-20240528113248.al8.x86_64.rpm

    14.10.20.0

    1.5.0-1

    20240430

    PolarDB-Tools-2.0.14.20.0-20240430113649.al8.x86_64.rpm

    ARM

    14.13.26.0

    1.5.1-1

    20241030

    PolarDB-Tools-2.0.14.26.0-20241023104506.al8.aarch64.rpm

    14.12.23.1

    1.5.1

    20240801

    PolarDB-Tools-2.0.14.23.1-20240723195433.al8.aarch64.rpm

    14.11.21.0

    1.5.0-2

    20240530

    PolarDB-Tools-2.0.14.21.0-20240528113248.al8.aarch64.rpm

    14.10.20.0

    1.5.0-1

    20240430

    PolarDB-Tools-2.0.14.20.0-20240430113649.al8.aarch64.rpm

    AliOS 7/

    ALinux 2/

    Anolis 7/

    CentOS 7

    X86

    14.13.26.0

    1.5.1-1

    20241030

    PolarDB-Tools-2.0.14.26.0-20241023104506.alios7.x86_64.rpm

    14.12.23.1

    1.5.1

    20240801

    PolarDB-Tools-2.0.14.23.1-20240723195433.alios7.x86_64.rpm

    14.11.21.0

    1.5.0-2

    20240530

    PolarDB-Tools-2.0.14.21.0-20240528113248.alios7.x86_64.rpm

    14.10.20.0

    1.5.0-1

    20240430

    PolarDB-Tools-2.0.14.20.0-20240430113649.alios7.x86_64.rpm

    ARM

    14.13.26.0

    1.5.1-1

    20241030

    PolarDB-Tools-2.0.14.26.0-20241023104506.alios7.aarch64.rpm

    14.12.23.1

    1.5.1

    20240801

    PolarDB-Tools-2.0.14.23.1-20240723195433.alios7.aarch64.rpm

    14.11.21.0

    1.5.0-2

    20240530

    PolarDB-Tools-2.0.14.21.0-20240528113248.alios7.aarch64.rpm

    14.10.20.0

    1.5.0-1

    20240430

    PolarDB-Tools-2.0.14.20.0-20240430113649.alios7.aarch64.rpm

  2. Run the following installation command.

    yum install PolarDB-Tools-2.0.14.10.0-20230622222102.al8.x86_64.rpm	
    Note

    Replace 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.