Installing the SQL Profiler extension v9

You must install and enable the SQL Profiler extension on each server on which you want to use it. For example, if you have a host running PostgreSQL 14 and PostgreSQL 15, you must enable the extension on each server.

SQL Profiler is supported on the same platforms as the Postgres distribution you're using. Support for the SQL Profiler extension starts with version 11 for PostgreSQL and EDB Postgres Advanced Server and version 12 for EDB Postgres Extended. See:

Installing the package

Prerequisites

Before you begin the installation process:

Install the package

The syntax for the install command is:

sudo <package-manager> -y install edb-<postgres><postgres_version>-server-sqlprofiler

Where:

  • <package-manager>is the package manager used with your operating system:

    Package managerOperating system
    dnfRHEL 8 and derivatives
    yumRHEL 7 and derivatives, CentOS 7
    zypperSLES
    apt-getDebian and derivatives
  • <postgres> is the distribution of Postgres you're using:

    Postgres distributionValue
    PostgreSQLpg
    EDB Postgres Advanced Serveras
    EDB Postgres Extendedpostgresextended
  • <postgres_version> is the version of Postgres you're using.

For example, to install the latest version of SQL Profiler for EDB Postgres Advanced Server 15 on a RHEL 8 platform:

sudo dnf -y install edb-as15-server-sqlprofiler

Enabling the extension

To enable the extension:

  1. Edit the postgresql.conf file on the server you want to profile, modifying the shared_preload_libraries parameter:

    shared_preload_libraries = '$libdir/sql-profiler'
  2. Restart the Postgres server.

  3. Create the SQL Profiler extension in your database with the following command:

    CREATE EXTENSION sql_profiler;
Note

If you are connected to the PEM server with the PEM client before configuring SQL Profiler, you must disconnect and reconnect with the server to enable SQL Profiler functionality.

After enabling the extension, SQL Profiler is ready to use with all databases that reside on the server.