From b8dcd0ee0b7e94adf2749c0afd40f30715eea8a7 Mon Sep 17 00:00:00 2001 From: Dragos Andriciuc Date: Thu, 23 Apr 2026 16:33:06 +0300 Subject: [PATCH] Backport for Update Quick Start Guide Postgresql Server (16) This PR is a backport for #925. --- docs/installing.md | 27 +++++----- docs/quick-start.md | 119 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 14 deletions(-) create mode 100644 docs/quick-start.md diff --git a/docs/installing.md b/docs/installing.md index 27c95e567..c1e0060df 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -1,21 +1,19 @@ -# Quickstart guide +# Installation overview -Percona Distribution for PostgreSQL is the PostgreSQL server with the collection of tools from PostgreSQL community that are tested to work together and serve to assist you in deploying and managing PostgreSQL. [Read more](index.md). +Percona Distribution for PostgreSQL packages PostgreSQL together with a curated set of open source extensions and tools that are tested to work together reliably. -This document aims to guide database application developers and DevOps engineer in getting started with Percona Distribution for PostgreSQL. Upon completion of this guide, you’ll have Percona Distribution for PostgreSQL installed and operational, and you’ll be able to: +This section explains how to install Percona Distribution for PostgreSQL on supported platforms. -* Connect to PostgreSQL using the `psql` interactive terminal -* Interact with PostgreSQL with basic psql commands -* Manipulate data in PostgreSQL -* Understand the next steps you can take as a database application developer or administrator to expand your knowledge of Percona Distribution for PostgreSQL +Choose the installation method that best fits your environment: -## Install Percona Distribution for PostgreSQL - -You can select from multiple easy-to-follow installation options, however **we strongly recommend using a Package Manager** for a convenient and quick way to try the software first. +- Package manager, **recommended** for most Linux systems +- Docker, for quick evaluations or development +- Kubernetes, for production Kubernetes environments +- Tarballs, manual installation for custom environments (**not recommended** for mission-critical environments) === ":octicons-terminal-16: Package manager" - Percona provides installation packages in `DEB` and `RPM` format for 64-bit Linux distributions. Find the full list of supported platforms and versions on the [Percona Software and Platform Lifecycle page :octicons-link-external-16:](https://www.percona.com/services/policies/percona-software-support-lifecycle#pgsql). + Percona provides installation packages in `DEB` and `RPM` format for 64-bit Linux distributions. See the [Percona Software and Platform Lifecycle page :octicons-link-external-16:](https://www.percona.com/services/policies/percona-software-support-lifecycle#pgsql) for the full list of supported platforms and versions. If you are on Debian or Ubuntu, use `apt` for installation. @@ -26,7 +24,7 @@ You can select from multiple easy-to-follow installation options, however **we s === ":simple-docker: Docker" - Get our image from Docker Hub and spin up a cluster on a Docker container for quick evaluation. + Run Percona Distribution for PostgreSQL in a Docker container for quick evaluation or development. Check below to get access to a detailed step-by-step guide. @@ -34,7 +32,7 @@ You can select from multiple easy-to-follow installation options, however **we s === ":simple-kubernetes: Kubernetes" - **Percona Operator for Kubernetes** is a controller introduced to simplify complex deployments that require meticulous and secure database expertise. + Use the Percona Operator for Kubernetes to deploy and manage PostgreSQL clusters on Kubernetes. Check below to get access to a detailed step-by-step guide. @@ -49,4 +47,5 @@ You can select from multiple easy-to-follow installation options, however **we s !!! note This method is **not recommended** for mission-critical environments. - [Install from tarballs :material-arrow-right:](tarball.md){.md-button} + + [Install from tarballs :material-arrow-right:](tarball.md){.md-button} diff --git a/docs/quick-start.md b/docs/quick-start.md new file mode 100644 index 000000000..e787fbb47 --- /dev/null +++ b/docs/quick-start.md @@ -0,0 +1,119 @@ +# 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) + +```{.bash data-prompt="$"} +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-{{pgversion}} +sudo apt install percona-postgresql-{{pgversion}} +sudo -i -u postgres psql +``` + +After psql starts, run the following SQL commands: + +```sql +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','john.doe@example.com'); +SELECT * FROM customers; +\q +``` + +For a step-by-step explanation, continue below. + +## Install on Debian / Ubuntu (APT) {.power-number} + +1. Fetch the `percona-release` package: + + ```{.bash data-prompt="$"} + 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: + + ```{.bash data-prompt="$"} + sudo percona-release setup ppg-{{pgversion}} + sudo apt install percona-postgresql-{{pgversion}} + ``` + + 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: + + ```{.bash data-prompt="$"} + sudo -i -u postgres + psql + ``` + +4. Create a database and make a table in the database: + + ```sql + 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: + + ```sql + INSERT INTO customers (first_name, last_name, email) VALUES ('John', 'Doe', 'john.doe@example.com'); + 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](apt.md). + +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](yum.md). + +## What's next + +Now that your PostgreSQL server is running, you can explore additional capabilities of Percona Distribution for PostgreSQL. + +
+ +### Learn PostgreSQL basics { .title } + +Connect with `psql` and run SQL commands, manage users, roles, and configure authentication. + +[Manipulate data in PostgreSQL :material-arrow-right:](crud.md){ .md-button } + +
+ +### Enable extensions { .title } + +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 :material-arrow-right:](extensions.md){ .md-button } + +
+ +### Configure backups { .title } + +For production deployments we recommend configuring backups. + +[See Backup and disaster recovery in Percona :material-arrow-right:](solutions/backup-recovery.md){.md-button} +
+ +### Configure high availability with Patroni { .title } + +Deploy a highly available PostgreSQL cluster using Patroni to prevent service interruptions. + +[See High Availability in PostgreSQL :material-arrow-right:](solutions/high-availability.md){.md-button} + +
+