Skip to content

Rate this page
Thanks for your feedback
Thank you! The feedback has been submitted.

For help, click the link below to get free database assistance or contact our experts for personalized support.

Quickstart guide

This guide shows how to install and start Percona Distribution for PostgreSQL on Debian- and RHEL-based Linux systems. After completing this guide, you will have:

  • PostgreSQL running locally
  • A database named test
  • A table named customers
  • One inserted row you can query

Fast path (2-minute install)

wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
sudo percona-release setup ppg-18  
sudo apt install percona-postgresql-18
sudo -i -u postgres psql

After psql starts, run the following SQL commands:

CREATE DATABASE test;
\c test
CREATE TABLE customers (first_name VARCHAR(50), last_name VARCHAR(50), email VARCHAR(100));
INSERT INTO customers VALUES ('John','Doe','[email protected]');
SELECT * FROM customers;
\q

For a step-by-step explanation, continue below.

Install on Debian / Ubuntu (APT)

  1. Fetch the percona-release package:

    wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
    sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
    
  2. Enable the repository and install the package:

    sudo percona-release setup ppg-18
    sudo apt install percona-postgresql-18
    

    The installation process automatically initializes and starts the default database.

    Note

    On Debian and Ubuntu systems, the postgresql service may show as active (exited). This is expected.

  3. Switch to the postgres user and open the psql interactive terminal:

    sudo -i -u postgres
    psql
    
  4. Create a database and make a table in the database:

    CREATE DATABASE test;
    \c test
    CREATE TABLE customers (first_name VARCHAR(50), last_name VARCHAR(50), email VARCHAR(100));
    
  5. Insert data in the customers table and query the data insertion:

    INSERT INTO customers (first_name, last_name, email) VALUES ('John', 'Doe', '[email protected]');
    SELECT * FROM customers;
    \q
    

Congratulations! Percona Distribution for PostgreSQL is now running and you have created your first database.

For detailed installation steps and further instructions on Debian and Ubuntu, see the Install Percona Distribution for PostgreSQL on Debian and Ubuntu.

For detailed installation steps and further instructions on Red Hat Enterprise Linux and derivatives, see the Install Percona Distribution for PostgreSQL on Red Hat Enterprise Linux and derivatives.

What’s next

Now that your PostgreSQL server is running, you can explore additional capabilities of Percona Distribution for PostgreSQL.

Learn PostgreSQL basics

Connect with psql and run SQL commands, manage users, roles, and configure authentication.

Manipulate data in PostgreSQL

Enable extensions

Percona Distribution for PostgreSQL includes tested open source extensions, such as pg_stat_monitor for query performance monitoring, pg_tde for protecting data at rest and more.

See Extensions

Configure backups

For production deployments we recommend configuring backups.

See Backup and disaster recovery in Percona

Configure high availability with Patroni

Deploy a highly available PostgreSQL cluster using Patroni to prevent service interruptions.

See High Availability in PostgreSQL