From 24f17fa32db7ae4cedc16dd01ecf03a109203b33 Mon Sep 17 00:00:00 2001 From: Anastasia Alexandrova Date: Wed, 19 Jun 2024 15:10:45 +0300 Subject: [PATCH] PG-798 Restructured docs for 12 (#607) * Restructured docs * Reworked the What's in it section * Added power number * Added icons --- .python-version | 1 + .vscode/settings.json | 5 ++ CONTRIBUTING.md | 15 +++- docs/apt.md | 38 +++------ docs/connect.md | 73 +++++++++++++++++ docs/crud.md | 112 ++++++++++++++++++++++++++ docs/docker.md | 10 +-- docs/enable-extensions.md | 16 ++-- docs/extensions.md | 7 +- docs/extenstions.md | 3 - docs/index.md | 55 +++++++++---- docs/installing.md | 41 +++++++--- docs/ldap.md | 2 +- docs/licensing.md | 5 +- docs/major-upgrade.md | 30 +++---- docs/migration.md | 28 ++++--- docs/minor-upgrade.md | 11 ++- docs/pg-stat-monitor.md | 18 ++--- docs/release-notes-v12.17.md | 22 +++++ docs/release-notes-v12.17.upd.md | 2 +- docs/release-notes-v12.18.md | 22 +++++ docs/solutions.md | 30 +++++++ docs/solutions/backup-recovery.md | 10 +-- docs/solutions/dr-pgbackrest-setup.md | 10 +-- docs/solutions/ha-setup-apt.md | 2 +- docs/solutions/ha-setup-yum.md | 4 +- docs/solutions/high-availability.md | 6 +- docs/solutions/pgbackrest.md | 12 +-- docs/solutions/postgis-deploy.md | 12 +-- docs/solutions/postgis-upgrade.md | 6 +- docs/solutions/postgis.md | 4 +- docs/trademark-policy.md | 2 +- docs/troubleshooting.md | 23 ++++++ docs/uninstalling.md | 6 +- docs/whats-next.md | 25 ++++++ docs/yum.md | 50 +++++------- mkdocs-base.yml | 90 +++++++++++---------- snippets/supported-versions.md | 2 +- 38 files changed, 581 insertions(+), 229 deletions(-) create mode 100644 .python-version create mode 100644 .vscode/settings.json create mode 100644 docs/connect.md create mode 100644 docs/crud.md delete mode 100644 docs/extenstions.md create mode 100644 docs/solutions.md create mode 100644 docs/troubleshooting.md create mode 100644 docs/whats-next.md diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..371cfe355 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11.1 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..eb98bbf51 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "cSpell.words": [ + "Quickstart" + ] +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7625fa432..276530acd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,15 @@ Thank you for deciding to contribute and help us improve Percona Distribution fo We welcome contributors from all users and community. By contributing, you agree to the [Percona Community code of conduct](https://github.com/percona/community/blob/main/content/contribute/coc.md). -This repository contains the source file for `pg_stat_monitor` documentation and this document explains how you can contribute to it. +You can contribute to documentation in the following ways: + +1. **Request a doc change through a Jira issue**. If you’ve spotted a doc issue (a typo, broken links, inaccurate instructions, etc.) but don’t have time nor desire to fix it yourself - let us know about it. + + - Click the **Submit DOC bug** link on the sidebar. This opens the [Jira issue tracker](https://jira.percona.com/projects/DISTPG/issues) for the doc project. + - Sign in (create a Jira account if you don’t have one) and click **Create** to create an issue. + - Describe the issue you have detected in the Summary, Description, Steps To Reproduce, Affects Version fields. + +2. **[Contribute to documentation yourself](#contribute-to-documentation-yourself)**. There is the **Edit this page** link that leads you to the source file of the page on GitHub. There you make changes, create a pull request that we review and add to the doc project. For details how to do it, read on. ## Contribute to documentation @@ -14,7 +22,8 @@ Percona Distribution for PostgreSQL documentation is written in [Markdown](https To contribute to the documentation, you should be familiar with the following technologies: -- [MkDocs](https://www.mkdocs.org/getting-started/) documentation generator. We use it to convert source ``.md`` files to .html and PDF documents. +- [Markdown](https://www.markdownguide.org/basic-syntax/) markup language. It is used to write the documentation. +- [MkDocs](https://www.mkdocs.org/getting-started/) documentation generator. We use it to convert source ``.md`` files to html and PDF documents. - [git](https://git-scm.com/) and [GitHub](https://guides.github.com/activities/hello-world/) - [Docker](https://docs.docker.com/get-docker/). It allows you to run MkDocs in a virtual environment instead of installing it and its dependencies on your machine. @@ -27,6 +36,7 @@ Each version has a branch in the repository named accordingly: - 13 - 14 - 15 +- 16 The source .md files are in the ``docs`` directory. @@ -128,6 +138,7 @@ The PDF document is in the ``site/pdf`` folder. ```sh mkdocs build ``` + 4. Go to the ``site`` directory and open the ``index.html`` file in your web browser to see the documentation. 5. To automatically rebuild the documentation and reload the browser as you make changes, run the following command: diff --git a/docs/apt.md b/docs/apt.md index d47f00e6e..cc92d3a0d 100644 --- a/docs/apt.md +++ b/docs/apt.md @@ -1,6 +1,6 @@ # Install Percona Distribution for PostgreSQL on Debian and Ubuntu -This document describes how to install Percona Distribution for PostgreSQL from Percona repositories on DEB-based distributions such as Debian and Ubuntu. [Read more about Percona repositories :material-arrow-top-right:](repo-overview.md). +This document describes how to install Percona Distribution for PostgreSQL from Percona repositories on DEB-based distributions such as Debian and Ubuntu. [Read more about Percona repositories](repo-overview.md). ## Preconditions @@ -11,7 +11,7 @@ This document describes how to install Percona Distribution for PostgreSQL from Run all the commands in the following sections as root or using the `sudo` command: -### Configure Percona repository +### Configure Percona repository {.power-number} 1. Install the `percona-release` repository management tool to subscribe to Percona repositories: @@ -53,6 +53,9 @@ Run all the commands in the following sections as root or using the `sudo` comma === "Install packages individually" + Run the following commands: + {.power-number} + 1. Install the PostgreSQL server package: ```{.bash data-prompt="$"} @@ -146,33 +149,10 @@ The installation process automatically initializes and starts the default databa $ sudo systemctl status postgresql.service ``` -### Connect to the PostgreSQL server - -By default, `postgres` user and `postgres` database are created in PostgreSQL upon its installation and initialization. This allows you to connect to the database as the `postgres` user. - -```{.bash data-prompt="$"} -$ sudo su postgres -``` - -Open the PostgreSQL interactive terminal: - -```{.bash data-prompt="$"} -$ psql -``` - -!!! hint - - You can connect to `psql` as the `postgres` user in one go: - - ```{.bash data-prompt="$"} - $ sudo su - postgres -c psql - ``` - -To exit the `psql` terminal, use the following command: - -```{.bash data-prompt="$"} -$ \q -``` +Congratulations! Your Percona Distribution for PostgreSQL is up and running. +## Next steps +[Enable extensions :material-arrow-right:](enable-extensions.md){.md-button} +[Connect to PostgreSQL :material-arrow-right:](connect.md){.md-button} diff --git a/docs/connect.md b/docs/connect.md new file mode 100644 index 000000000..18a1cb9b9 --- /dev/null +++ b/docs/connect.md @@ -0,0 +1,73 @@ +# Connect to the PostgreSQL server + +With PostgreSQL server up and running, let's connect to it. + +By default, the `postgres` user and the `postgres` database are created in PostgreSQL upon its installation and initialization. This allows you to connect to the database as the `postgres` user. +{.power-number} + +1. Switch to the `postgres` user. + + ```{.bash data-prompt="$"} + $ sudo su postgres + ``` + +2. Open the PostgreSQL interactive terminal `psql`: + + ```{.bash data-prompt="$"} + $ psql + ``` + + :material-information: Hint: You can connect to `psql` as the `postgres` user in one go: + + ```{.bash data-prompt="$"} + $ sudo su - postgres -c psql + ``` + + +## Basic `psql` commands + +While connected to PostgreSQL, let's practice some basic `psql` commands to interact with the database: + +1. List databases: + + ```{.bash data-prompt="$"} + $ \l + ``` + +2. Display tables in the current database: + + ```{.bash data-prompt="$"} + $ \dt + ``` + +3. Display columns in a table + + ```{.bash data-prompt="$"} + $ \d + ``` + +4. Switch databases + + ```{.bash data-prompt="$"} + $ \c + ``` + +5. Display users and roles + + ```{.bash data-prompt="$"} + $ \du + ``` + +6. Exit the `psql` terminal: + + ```{.bash data-prompt="$"} + $ \q + ``` + +To learn more about using `psql`, see [`psql` :octicons-link-external-16:](https://www.postgresql.org/docs/current/app-psql.html) documentation. + +Congratulations! You have connected to PostgreSQL and learned some essential `psql` commands. + +## Next steps + +[Manipulate data in PostgreSQL :material-arrow-right:](crud.md){.md-button} \ No newline at end of file diff --git a/docs/crud.md b/docs/crud.md new file mode 100644 index 000000000..75d43d710 --- /dev/null +++ b/docs/crud.md @@ -0,0 +1,112 @@ +# Manipulate data in PostgreSQL + +On the previous step, you have [connected to PostgreSQL](connect.md) as the superuser `postgres`. Now, let's insert some sample data and operate with it in PostgreSQL. + +## Create a database + +Let's create the database `test`. Use the CREATE DATABASE command: + +```sql +CREATE DATABASE test; +``` + +## Create a table + +Let's create a sample table `Customers` in the `test` database using the following command: + +```sql +CREATE TABLE customers ( + id SERIAL PRIMARY KEY, -- 'id' is an auto-incrementing integer + first_name VARCHAR(50), -- 'first_name' is a string with a maximum length of 50 characters + last_name VARCHAR(50), -- 'last_name' is a string with a maximum length of 50 characters + email VARCHAR(100) -- 'email' is a string with a maximum length of 100 characters +); +``` + +:material-information: Hint:Having issues with table creation? Check our [Troubleshooting guide](troubleshooting.md) + +## Insert the data + +Populate the table with the sample data as follows: + +```sql +INSERT INTO customers (first_name, last_name, email) +VALUES + ('John', 'Doe', 'john.doe@example.com'), -- Insert a new row + ('Jane', 'Doe', 'jane.doe@example.com'); + ('Alice', 'Smith', 'alice.smith@example.com'); +``` + +## Query data + +Let's verify the data insertion by querying it: + +```sql +SELECT * FROM customers; +``` + +??? example "Expected output" + + ```{.sql .no-copy} + id | first_name | last_name | email + ----+------------+-----------+------------------------- + 1 | John | Doe | john.doe@example.com + 2 | Jane | Doe | jane.doe@example.com + 3 | Alice | Smith | alice.smith@example.com + (3 rows) + ``` + +## Update data + +Let's update John Doe's record with a new email address. + +1. Use the UPDATE command for that: + + ```sql + UPDATE customers + SET email = 'john.doe@myemail.com' + WHERE first_name = 'John' AND last_name = 'Doe'; + ``` + +2. Query the table to verify the updated data: + + ```sql + SELECT * FROM customers WHERE first_name = 'John' AND last_name = 'Doe'; + ``` + + ??? example "Expected output" + + ```{.sql .no-copy} + id | first_name | last_name | email + ----+------------+-----------+------------------------- + 2 | Jane | Doe | jane.doe@example.com + 3 | Alice | Smith | alice.smith@example.com + 1 | John | Doe | john.doe@myemail.com + (3 rows) + ``` + +## Delete data + +Use the DELETE command to delete rows. For example, delete the record of Alice Smith: + +```sql +DELETE FROM Customers WHERE first_name = 'Alice' AND last_name = 'Smith'; +``` + +If you wish to delete the whole table, use the `DROP TABLE` command instead as follows: + +```sql +DROP TABLE customers; +``` + +To delete the whole database, use the DROP DATABASE command: + +```sql +DROP DATABASE test; +``` + +Congratulations! You have used basic create, read, update and delete (CRUD) operations to manipulate data in Percona Distribution for PostgreSQL. To deepen your knowledge, see the [data manipulation :octicons-link-external-16:](https://www.postgresql.org/docs/{{pgversion}}/dml.html) section in PostgreSQL documentation. + +## Next steps + +[What's next?](whats-next.md)(.md-button) \ No newline at end of file diff --git a/docs/docker.md b/docs/docker.md index 49ce8efdb..274d44840 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -1,12 +1,12 @@ # Run Percona Distribution for PostgreSQL in a Docker container -Docker images of Percona Distribution for PostgreSQL are hosted publicly on [Docker Hub](https://hub.docker.com/r/percona/percona-distribution-postgresql/). +Docker images of Percona Distribution for PostgreSQL are hosted publicly on [Docker Hub :octicons-link-external-16:](https://hub.docker.com/r/percona/percona-distribution-postgresql/). -For more information about using Docker, see the [Docker Docs](https://docs.docker.com/). +For more information about using Docker, see the [Docker Docs :octicons-link-external-16:](https://docs.docker.com/). !!! note "" - Make sure that you are using the latest version of Docker. The ones provided via `apt` and `yum` may be outdated and cause errors. + Make sure that you are using [the latest version of Docker :octicons-link-external-16:](https://docs.docker.com/get-docker/). The ones provided via `apt` and `yum` may be outdated and cause errors. By default, Docker pulls the image from Docker Hub if it is not available locally. @@ -28,7 +28,7 @@ For more information about using Docker, see the [Docker Docs](https://docs.dock | `percona-pg_repack{{pgversion}}`| rebuilds PostgreSQL database objects.| | `percona-wal2json{{pgversion}}` | a PostgreSQL logical decoding JSON output plugin.| -## Start the container +## Start the container {.power-number} 1. Start a Percona Distribution for PostgreSQL container as follows: @@ -40,7 +40,7 @@ For more information about using Docker, see the [Docker Docs](https://docs.dock * `container-name` is the name you assign to your container * `POSTGRES_PASSWORD` is the superuser password - * `tag-multi` is the tag specifying the version you need. For example, `{{dockertag}}-multi`. The `multi` part of the tag serves to identify the architecture (x86_64 or ARM64) and pull the respective image. See the [full list of tags](https://hub.docker.com/r/percona/percona-distribution-postgresql/tags/). + * `tag-multi` is the tag specifying the version you need. For example, `{{dockertag}}-multi`. The `multi` part of the tag serves to identify the architecture (x86_64 or ARM64) and pull the respective image. See the [full list of tags :octicons-link-external-16:](https://hub.docker.com/r/percona/percona-distribution-postgresql/tags/). !!! tip diff --git a/docs/enable-extensions.md b/docs/enable-extensions.md index 2fc52c072..3fda56507 100644 --- a/docs/enable-extensions.md +++ b/docs/enable-extensions.md @@ -12,18 +12,18 @@ While setting up a high availability PostgreSQL cluster with Patroni, you will n - Distributed Configuration Store (DCS). Patroni supports such DCSs as etcd, zookeeper, Kubernetes though [etcd](https://etcd.io/) is the most popular one. It is available within Percona Distribution for PostgreSQL for all supported operating systems. -- [HAProxy](http://www.haproxy.org/). +- [HAProxy :octicons-link-external-16:](http://www.haproxy.org/). See the configuration guidelines for [Debian and Ubuntu](solutions/ha-setup-apt.md) and [RHEL and CentOS](solutions/ha-setup-yum.md). !!! admonition "See also" - - [Patroni documentation](https://patroni.readthedocs.io/en/latest/SETTINGS.html#settings) + - [Patroni documentation :octicons-link-external-16:](https://patroni.readthedocs.io/en/latest/SETTINGS.html#settings) - Percona Blog: - - [PostgreSQL HA with Patroni: Your Turn to Test Failure Scenarios](https://www.percona.com/blog/2021/06/11/postgresql-ha-with-patroni-your-turn-to-test-failure-scenarios/) + - [PostgreSQL HA with Patroni: Your Turn to Test Failure Scenarios :octicons-link-external-16:](https://www.percona.com/blog/2021/06/11/postgresql-ha-with-patroni-your-turn-to-test-failure-scenarios/) **pgBadger** @@ -41,11 +41,11 @@ log_autovacuum_min_duration = 0 log_error_verbosity = default ``` -For details about each option, see [pdBadger documentation](https://github.com/darold/pgbadger/#POSTGRESQL-CONFIGURATION). +For details about each option, see [pdBadger documentation :octicons-link-external-16:](https://github.com/darold/pgbadger/#POSTGRESQL-CONFIGURATION). **pgAudit set-user** -Add the `set-user` to `shared_preload_libraries` in `postgresql.conf`. The recommended way is to use the [ALTER SYSTEM](https://www.postgresql.org/docs/14/sql-altersystem.html) command. [Connect to psql](#connect-to-the-postgresql-server) and use the following command: +Add the `set-user` to `shared_preload_libraries` in `postgresql.conf`. The recommended way is to use the [ALTER SYSTEM :octicons-link-external-16:](https://www.postgresql.org/docs/12/sql-altersystem.html) command. [Connect to psql](connect.md) and use the following command: ```sql ALTER SYSTEM SET shared_preload_libraries = 'set-user'; @@ -53,7 +53,7 @@ ALTER SYSTEM SET shared_preload_libraries = 'set-user'; Start / restart the server to apply the configuration. -You can fine-tune user behavior with the [custom parameters](https://github.com/pgaudit/set_user#configuration-options) supplied with the extension. +You can fine-tune user behavior with the [custom parameters :octicons-link-external-16:](https://github.com/pgaudit/set_user#configuration-options) supplied with the extension. **wal2json** @@ -62,3 +62,7 @@ After the installation, enable the following option in `postgresql.conf` configu ``` wal_level = logical ``` + +## Next steps + +[Connect to PostgreSQL :material-arrow-right:](connect.md){.md-button} \ No newline at end of file diff --git a/docs/extensions.md b/docs/extensions.md index 1b2ca9e00..214908e20 100644 --- a/docs/extensions.md +++ b/docs/extensions.md @@ -5,17 +5,16 @@ Percona Distribution for PostgreSQL includes a set of extensions that have been The set of extensions includes the following: * [PostgreSQL contrib modules and utilities](contrib.md) -* [Third-party components](third-party.md) * Extensions authored by Percona: * [`pg_stat_monitor`](pg-stat-monitor.md) - * [`pg_tde`](#) + +* [Third-party components](third-party.md) -* Extra modules, not included in Percona Distribution for PostgreSQL but tested to work with it and supported by Percona. +Additionally, see the list of [PostgreSQL software](https://www.percona.com/services/support/support-tiers-postgresql) covered by Percona Support. ## Install an extension To use an extension, install it. Run the [`CREATE EXTENSION`](https://www.postgresql.org/docs/current/static/sql-createextension.html) command on the PostgreSQL node where you want the extension to be available. The user should be a superuser or have the `CREATE` privilege on the current database to be able to run the [`CREATE EXTENSION`](https://www.postgresql.org/docs/current/static/sql-createextension.html) command. Some extensions may require additional privileges depending on their functionality. To learn more, check the documentation for the desired extension. - diff --git a/docs/extenstions.md b/docs/extenstions.md deleted file mode 100644 index 5c6557f8c..000000000 --- a/docs/extenstions.md +++ /dev/null @@ -1,3 +0,0 @@ -# Extensions - -[pg_stat_monitor](pg-stat-monitor.md) \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index c682248c7..0bb03e307 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,28 +1,53 @@ # Percona Distribution for PostgreSQL 12 Documentation -Percona Distribution for PostgreSQL is a collection of tools to assist you in managing your PostgreSQL -database system: it installs PostgreSQL and complements it by a selection of -extensions that enable solving essential practical tasks efficiently. + Percona Distribution for PostgreSQL is a suite of open source software, tools and services required to deploy and maintain a reliable production cluster for PostgreSQL. It includes native PostgreSQL server, enhanced with extensions from open source community that are certified and tested to work together for high availability, backups, security, and monitoring that help ensure the cluster's peak performance. + + Part of the solution, Percona Operator for PostgreSQL, makes it easy to orchestrate the cluster reliably and repeatably in Kubernetes. -[What's included in the Distribution](extensions.md){.md-button} +[What's included in Percona Distribution for PostgreSQL? :material-arrow-right:](extensions.md){.md-button} -[Get started](installing.md){ .md-button } -[What's new]({{release}}.md){ .md-button } +## What’s in it for you? -!!! admonition "See also" +- No vendor lock in - all components of Percona Distribution for PostgreSQL are fully open source +- No guesswork on finding the right version of a component – they all undergo thorough testing to ensure compatibility +- Freely available reference architectures for solutions like high-availability, backups and disaster recovery +- Spatial data handling support via PostGIS +- Monitoring of the database health, performance and infrastructure usage via open source [Percona Management and Monitoring :octicons-link-external-16:](https://www.percona.com/doc/percona-monitoring-and-management/2.x/index.html) with PostgreSQL-specific dashboards +- Run PostgreSQL on Kubernetes using open source [Percona Operator for PostgreSQL:octicons-link-external-16:](https://docs.percona.com/percona-operator-for-postgresql/2.0/index.html). It not only automates deployment and management of PostgreSQL clusters on Kubernetes, but also includes enterprise-ready features for high-availability, backup and restore, replication, logging, and more - Blog posts +
- - [pgBackRest - A Great Backup Solution and a Wonderful Year of - Growth](https://www.percona.com/blog/2019/05/10/pgbackrest-a-great-backup-solution-and-a-wonderful-year-of-growth/) - - [Securing PostgreSQL as an Enterprise-Grade - Environment](https://www.percona.com/blog/2018/09/21/securing-postgresql-as-an-enterprise-grade-environment/) +## :material-progress-download: Installation guides { .title } -Percona Distribution for PostgreSQL is also shipped with the [libpq](https://www.postgresql.org/docs/12/libpq.html) library. It contains “a set of -library functions that allow client programs to pass queries to the PostgreSQL -backend server and to receive the results of these queries.” +Get started quickly with the step-by-step installation instructions. +[Quickstart guides :material-arrow-right:](installing.md){ .md-button } +
+ +### :fontawesome-solid-gears: Solutions { .title } + +Check our solutions to build the database infrastructure that meets the requirements of your organization - be it high-availability, disaster recovery or spatial data handling. + +[Solutions :material-arrow-right:](solutions.md){ .md-button } + +
+ +### :material-frequently-asked-questions: Troubleshooting and FAQ { .title } + +Our comprehensive resources will help you overcome challenges, from everyday issues to specific doubts. + +[Troubleshooting :material-arrow-right:](troubleshooting.md){.md-button} + +
+ +### :loudspeaker: What's new? { .title } + +Learn about the releases and changes in the Distribution. + +[Release notes :material-arrow-right:](release-notes.md){.md-button} +
+
diff --git a/docs/installing.md b/docs/installing.md index 932d31cba..ca33e4b09 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -1,34 +1,55 @@ -# Install Percona Distribution for PostgreSQL +# Quickstart guide -Percona Distribution for PostgreSQL is the solution 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 :material-arrow-top-right: ](index.md). +Percona Distribution for PostgreSQL is the solution 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). + +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: + +* 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 + +## Install Percona Distribution for PostgreSQL You can select from multiple easy-to-follow installation options, but **we recommend using a Package Manager** for a convenient and quick way to try the software first. -=== "Package manager" +=== ":simple-windowsterminal: 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](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. 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). If you are on Debian or Ubuntu, use `apt` for installation. If you are on Red Hat Enterprise Linux or compatible derivatives, use `yum`. - Choose your package manager below to get access to a detailed step-by-step guide. - [Install via apt :material-arrow-right:](apt.md){.md-button} [Install via yum :material-arrow-right:](yum.md){.md-button} -=== "Docker" + +=== ":simple-docker: Docker" Get our image from Docker Hub and spin up a cluster on a Docker container for quick evaluation. Check below to get access to a detailed step-by-step guide. - [Run in Docker](docker.md){.md-button} + [Run in Docker :material-arrow-right:](docker.md){.md-button} -=== "Kubernetes" +=== ":simple-kubernetes: Kubernetes" **Percona Operator for Kubernetes** is a controller introduced to simplify complex deployments that require meticulous and secure database expertise. Check below to get access to a detailed step-by-step guide. - [Get started with Percona Operator for PostgreSQL](https://docs.percona.com/percona-operator-for-postgresql/2.0/quickstart.html){.md-button} + [Get started with Percona Operator :octicons-link-external-16:](https://docs.percona.com/percona-operator-for-postgresql/2.0/quickstart.html){.md-button} + +=== ":octicons-download-16: Manual download" + + If you need to install Percona Distribution for PostgreSQL offline or as a non-superuser, check out the link below for a step-by-step guide and get access to the downloads directory. + + Note that for this scenario you must make sure that all dependencies are satisfied. + + [Install from tarballs :material-arrow-right:](tarball.md){.md-button} + + + + + diff --git a/docs/ldap.md b/docs/ldap.md index 1c1ad8ed3..45e24eba1 100644 --- a/docs/ldap.md +++ b/docs/ldap.md @@ -2,6 +2,6 @@ When a client application or a user that runs the client application connects to the database, it must identify themselves. The process of validating the client's identity and determining whether this client is permitted to access the database it has requested is called **authentication**. -Percona Distribution for PortgreSQL supports several [authentication methods](https://www.postgresql.org/docs/12/auth-methods.html), including the [LDAP authentication](https://www.postgresql.org/docs/12/auth-ldap.html). The use of LDAP is to provide a central place for authentication - meaning the LDAP server stores usernames and passwords and their resource permissions. +Percona Distribution for PortgreSQL supports several [authentication methods :octicons-link-external-16:](https://www.postgresql.org/docs/15/auth-methods.html), including the [LDAP authentication :octicons-link-external-16:](https://www.postgresql.org/docs/14/auth-ldap.html). The use of LDAP is to provide a central place for authentication - meaning the LDAP server stores usernames and passwords and their resource permissions. The LDAP authentication in Percona Distribution for PortgreSQL is implemented the same way as in upstream PostgreSQL. \ No newline at end of file diff --git a/docs/licensing.md b/docs/licensing.md index c7985e376..56800d456 100644 --- a/docs/licensing.md +++ b/docs/licensing.md @@ -1,9 +1,8 @@ # Copyright and licensing information -Percona Distribution for PostgreSQL is licensed under the [PostgreSQL license](https://opensource.org/licenses/postgresql) and licenses of all components included in the Distribution. +Percona Distribution for PostgreSQL is licensed under the [PostgreSQL license :octicons-link-external-16:](https://opensource.org/licenses/postgresql) and licenses of all components included in the Distribution. ## Documentation licensing -Percona Distribution for PostgreSQL documentation is (C)2016-2023 Percona LLC and/or its affiliates -and is distributed under the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/) license. \ No newline at end of file +Percona Distribution for PostgreSQL documentation is (C)2009-2024 Percona LLC and/or its affiliates and is distributed under the [Creative Commons Attribution 4.0 International License :octicons-link-external-16:](https://creativecommons.org/licenses/by/4.0/). diff --git a/docs/major-upgrade.md b/docs/major-upgrade.md index ed5940292..0357d6268 100644 --- a/docs/major-upgrade.md +++ b/docs/major-upgrade.md @@ -18,10 +18,7 @@ The in-place upgrade means installing a new version without removing the old ver !!! admonition "See also" - `pg_upgrade` Documentation: - - [https://www.postgresql.org/docs/12/pgupgrade.html](https://www.postgresql.org/docs/12/pgupgrade.html) - + [`pg_upgrade` Documentation :octicons-link-external-16:](https://www.postgresql.org/docs/12/pgupgrade.html) Similar to installing, we recommend you to upgrade Percona Distribution for PostgreSQL from Percona repositories. @@ -58,15 +55,14 @@ The exact steps may differ depending on the package manager of your operating sy ## On Debian and Ubuntu using `apt` -!!! important - - Run **all** commands as root or via **sudo**. - +Run **all** commands as root or via **sudo**: +{.power-number} 1. Install Percona Distribution for PostgreSQL 12 packages. - - * Enable Percona repository using the **percona-release** utility: + * [Install percona-release :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html) + + * Enable Percona repository: ```{.bash data-prompt="$"} $ sudo percona-release setup ppg-12 @@ -187,21 +183,19 @@ The exact steps may differ depending on the package manager of your operating sy ## On Red Hat Enterprise Linux and derivatives using `yum` -!!! important - - Run **all** commands as root or via **sudo**. - +Run **all** commands as root or via **sudo**: +{.power-number} 1. Install Percona Distribution for PostgreSQL 12 packages - - * Enable Percona repository using the **percona-release** utility: + * [Install percona-release :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html) + + * Enable Percona repository: ```{.bash data-prompt="$"} $ sudo percona-release setup ppg-12 ``` - * Install Percona Distribution for PostgreSQL 12: ```{.bash data-prompt="$"} @@ -245,8 +239,6 @@ The exact steps may differ depending on the package manager of your operating sy $ sudo su postgres ``` -<<<<<<< HEAD - * Check the ability to upgrade Percona Distribution for PostgreSQL from 11 to 12: ```{.bash data-prompt="$"} diff --git a/docs/migration.md b/docs/migration.md index 02879c339..cd4645812 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -9,9 +9,12 @@ Depending on your business requirements, you may migrate to Percona Distribution ## Migrate on the same server -=== "On Debian and Ubuntu Linux" +=== ":material-debian: On Debian and Ubuntu" - To ensure that your data is safe during the migration, we recommend to make a backup of your data and all configuration files (such as `pg_hba.conf`, `postgresql.conf`, `postgresql.auto.conf`) using the tool of your choice. The backup process is out of scope of this document. You can use `pg_dumpall` or other tools of your choice. + >To ensure that your data is safe during the migration, we recommend to make a backup of your data and all configuration files (such as `pg_hba.conf`, `postgresql.conf`, `postgresql.auto.conf`) using the tool of your choice. The backup process is out of scope of this document. You can use `pg_dumpall` or other tools of your choice. For more information, see the blog post [PostgreSQL Upgrade Using pg_dumpall](https://www.percona.com/blog/postgresql-upgrade-using-pg_dumpall/) by _Avinash Vallarapu_, _Fernando Laudares Camargos_, _Jobin Augustine_ and _Nickolay Ihalainen_. + + Run **all** commands as root or via **sudo**: + {.power-number} 1. Stop the `postgresql` server @@ -25,7 +28,7 @@ Depending on your business requirements, you may migrate to Percona Distribution $ sudo apt-get --purge remove postgresql ``` - 3. [Install percona-release](https://docs.percona.com/percona-software-repositories/installing.html) + 3. [Install percona-release :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html) 4. Enable the repository ```{.bash data-prompt="$"} @@ -47,11 +50,14 @@ Depending on your business requirements, you may migrate to Percona Distribution ``` -=== "On RHEL and compatible derivatives" +=== ":material-redhat: On RHEL and compatible derivatives" To ensure that your data is safe during the migration, we recommend to make a backup of your data and all configuration files (such as `pg_hba.conf`, `postgresql.conf`, `postgresql.auto.conf`) using the tool of your choice. The backup process is out of scope of this document. You can use `pg_dumpall` or other tools of your choice. - 1. Stop the `postgresql` server + Run **all** commands as root or via **sudo**: + {.power-number} + + 1. Stop the `postgresql` server ```{.bash data-prompt="$"} $ sudo systemctl stop postgresql-12 @@ -63,7 +69,7 @@ Depending on your business requirements, you may migrate to Percona Distribution $ sudo yum remove postgresql ``` - 3. [Install percona-release](https://docs.percona.com/percona-software-repositories/installing.html) + 3. [Install percona-release :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html) 4. Enable the repository ```{.bash data-prompt="$"} @@ -86,6 +92,7 @@ In this scenario, we will refer to the server with PostgreSQL Community as the " To migrate from PostgreSQL Community to Percona Distribution for PostgreSQL on a different server, do the following: **On the source server**: +{.power-number} 1. Back up your data and all configuration files (such as `pg_hba.conf`, `postgresql.conf`, `postgresql.auto.conf`) using the tool of your choice. 2. Stop the `postgresql` service @@ -105,25 +112,26 @@ To migrate from PostgreSQL Community to Percona Distribution for PostgreSQL on a 3. Optionally, remove PostgreSQL Community packages **On the target server**: +{.power-number} -1. [Install percona-release](https://docs.percona.com/percona-software-repositories/installing.html) +1. [Install percona-release :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html) 2. Enable the repository ```{.bash data-prompt="$"} $ sudo percona-release setup ppg12 ``` -3. [Install Percona Distribution for PostgreSQL packages](installing.md#install-percona-distribution-for-postgresql-packages) on the target server. +3. [Install Percona Distribution for PostgreSQL packages](installing.md#__tabbed_1_1) on the target server. 4. Restore the data from the backup 5. Start `postgresql` service - === "On Debian and Ubuntu" + === ":material-debian: On Debian and Ubuntu" ```{.bash data-prompt="$"} $ sudo systemctl start postgresql.service ``` - === "On RHEL and compatible derivatives" + === ":material-redhat: On RHEL and compatible derivatives" ```{.bash data-prompt="$"} $ sudo systemctl start postgresql-12 diff --git a/docs/minor-upgrade.md b/docs/minor-upgrade.md index 374c2789c..57c2e5407 100644 --- a/docs/minor-upgrade.md +++ b/docs/minor-upgrade.md @@ -23,23 +23,22 @@ Minor upgrade of Percona Distribution for PostgreSQL includes the following step For more information about Percona repositories, refer to [Installing Percona Distribution for PostgreSQL](installing.md). - Before the upgrade, update the **percona-release** utility to the latest version. This is required to install the new version packages of Percona Distribution for PostgreSQL. Refer to [Percona Software Repositories Documentation](https://www.percona.com/doc/percona-repo-config/percona-release.html#updating-percona-release-to-the-latest-version) for update instructions. + Before the upgrade, [update the `percona-release` :octicons-link-external-16:](https://www.percona.com/doc/percona-repo-config/percona-release.html#updating-percona-release-to-the-latest-version) utility to the latest version. This is required to install the new version packages of Percona Distribution for PostgreSQL. -!!! important - - Run all commands as root or via **sudo**. +Run **all** commands as root or via **sudo**: +{.power-number} 1. Stop the `postgresql` service. - === "On Debian / Ubuntu" + === ":material-debian: On Debian / Ubuntu" ```{.bash data-prompt="$"} $ sudo systemctl stop postgresql.service ``` - === "On Red Hat Enterprise Linux / derivatives" + === ":material-redhat: On Red Hat Enterprise Linux / derivatives" ```{.bash data-prompt="$"} $ sudo systemctl stop postgresql-12 diff --git a/docs/pg-stat-monitor.md b/docs/pg-stat-monitor.md index a602149e5..84d23fd51 100644 --- a/docs/pg-stat-monitor.md +++ b/docs/pg-stat-monitor.md @@ -29,7 +29,7 @@ When a bucket lifetime expires, `pg_stat_monitor` resets all statistics and writ #### pg_stat_monitor view -The `pg_stat_monitor` view contains all the statistics collected and aggregated by the extension. This view contains one row for each distinct combination of metrics and whether it is a top-level statement or not (up to the maximum number of distinct statements that the module can track). For details about available metrics, refer to the [`pg_stat_monitor` view reference](https://docs.percona.com/pg-stat-monitor/reference.html). +The `pg_stat_monitor` view contains all the statistics collected and aggregated by the extension. This view contains one row for each distinct combination of metrics and whether it is a top-level statement or not (up to the maximum number of distinct statements that the module can track). For details about available metrics, refer to the [`pg_stat_monitor` view reference :octicons-link-external-16:](https://docs.percona.com/pg-stat-monitor/reference.html). The following are the primary keys for pg_stat_monitor: @@ -73,11 +73,11 @@ To learn more, see the [Changing the configuration](#changing-the-configuration) ## Installation -This section describes how to install `pg_stat_monitor` from Percona repositories. To learn about other installation methods, see the [Installation](https://docs.percona.com/pg-stat-monitor/install.html) section in the `pg_stat_monitor` documentation. +This section describes how to install `pg_stat_monitor` from Percona repositories. To learn about other installation methods, see the [Installation :octicons-link-external-16:](https://docs.percona.com/pg-stat-monitor/install.html) section in the `pg_stat_monitor` documentation. **Preconditions**: -To install `pg_stat_monitor` from Percona repositories, you need to subscribe to them. To do this, you must have the [`percona-release` repository management tool](https://www.percona.com/doc/percona-repo-config/installing.html) up and running. +To install `pg_stat_monitor` from Percona repositories, you need to subscribe to them. To do this, you must have the [`percona-release` repository management tool :octicons-link-external-16:](https://www.percona.com/doc/percona-repo-config/installing.html) up and running. To install `pg_stat_monitor`, run the following commands: @@ -122,7 +122,7 @@ To install `pg_stat_monitor`, run the following commands: 1. Add `pg_stat_monitor` in the `shared_preload_libraries` configuration parameter. - The recommended way to modify PostgreSQL configuration file is using the [ALTER SYSTEM](https://www.postgresql.org/docs/12/sql-altersystem.html) command. [Connect to `psql`](installing.md#connect-to-the-postgresql-server) and use the following command: + The recommended way to modify PostgreSQL configuration file is using the [ALTER SYSTEM](https://www.postgresql.org/docs/12/sql-altersystem.html) command. [Connect to `psql`](connecct.md) and use the following command: ```sql ALTER SYSTEM SET shared_preload_libraries = 'pg_stat_monitor'; @@ -190,7 +190,7 @@ SELECT DISTINCT userid::regrole, pg_stat_monitor.datname, substr(query,0, 50) ``` -Find more usage examples in the [`pg_stat_monitor` user guide](https://docs.percona.com/pg-stat-monitor/user_guide.html). +Find more usage examples in the [`pg_stat_monitor` user guide :octicons-link-external-16:](https://docs.percona.com/pg-stat-monitor/user_guide.html). ## Changing the configuration @@ -224,7 +224,7 @@ SELECT name, short_desc FROM pg_settings WHERE name LIKE '%pg_stat_monitor%'; pg_stat_monitor.pgsm_track_utility | Selects whether utility commands are tracked. ``` -You can change a parameter by setting a new value in the configuration file. Some parameters require server restart to apply a new value. For others, configuration reload is enough. Refer to the [configuration parameters](https://docs.percona.com/pg-stat-monitor/configuration.html) of the `pg_stat_monitor` documentation for the parameters’ description, how you can change their values and if the server restart is required to apply them. +You can change a parameter by setting a new value in the configuration file. Some parameters require server restart to apply a new value. For others, configuration reload is enough. Refer to the [configuration parameters :octicons-link-external-16:](https://docs.percona.com/pg-stat-monitor/configuration.html) of the `pg_stat_monitor` documentation for the parameters’ description, how you can change their values and if the server restart is required to apply them. As an example, let’s set the bucket lifetime from default 60 seconds to 30 seconds. Use the **ALTER SYSTEM** command: @@ -262,10 +262,10 @@ WHERE name = 'pg_stat_monitor.pgsm_bucket_time'; !!! admonition "See also" - [`pg_stat_monitor` Documentation](https://docs.percona.com/pg-stat-monitor/index.html) + [`pg_stat_monitor` Documentation :octicons-link-external-16:](https://docs.percona.com/pg-stat-monitor/index.html) Percona Blog: - * [pg_stat_monitor: A New Way Of Looking At PostgreSQL Metrics](https://www.percona.com/blog/2021/01/19/pg_stat_monitor-a-new-way-of-looking-at-postgresql-metrics/) - * [Improve PostgreSQL Query Performance Insights with pg_stat_monitor](https://www.percona.com/blog/improve-postgresql-query-performance-insights-with-pg_stat_monitor/) + * [pg_stat_monitor: A New Way Of Looking At PostgreSQL Metrics :octicons-link-external-16:](https://www.percona.com/blog/2021/01/19/pg_stat_monitor-a-new-way-of-looking-at-postgresql-metrics/) + * [Improve PostgreSQL Query Performance Insights with pg_stat_monitor :octicons-link-external-16:](https://www.percona.com/blog/improve-postgresql-query-performance-insights-with-pg_stat_monitor/) diff --git a/docs/release-notes-v12.17.md b/docs/release-notes-v12.17.md index f057ac12b..7f6c5f72a 100644 --- a/docs/release-notes-v12.17.md +++ b/docs/release-notes-v12.17.md @@ -19,6 +19,7 @@ The following is the list of extensions available in Percona Distribution for Po | Extension | Version | Description | | ------------------- | -------------- | ---------------------------- | +<<<<<<< HEAD:docs/release-notes-v12.17.md |[HAProxy](http://www.haproxy.org/) | 2.8.3 | a high-availability and load-balancing solution | | [Patroni](https://patroni.readthedocs.io/en/latest/) | 3.1.0 | a HA (High Availability) solution for PostgreSQL | | [PgAudit](https://www.pgaudit.org/) | 1.4.3 | provides detailed session or object audit logging via the standard logging facility provided by PostgreSQL | @@ -33,6 +34,22 @@ The following is the list of extensions available in Percona Distribution for Po | [PostGIS](https://github.com/postgis/postgis) | 3.3.4 | a spatial extension for PostgreSQL.| | [PostgreSQL Common](https://salsa.debian.org/postgresql/postgresql-common)| 256 | PostgreSQL database-cluster manager. It provides a structure under which multiple versions of PostgreSQL may be installed and/or multiple clusters maintained at one time.| |[wal2json](https://github.com/eulerto/wal2json) |2.5 | a PostgreSQL logical decoding JSON output plugin| +======= +|[HAProxy :octicons-link-external-16:](http://www.haproxy.org/) | 2.8.3 | a high-availability and load-balancing solution | +| [Patroni :octicons-link-external-16:](https://patroni.readthedocs.io/en/latest/) | 3.1.0 | a HA (High Availability) solution for PostgreSQL | +| [PgAudit :octicons-link-external-16:](https://www.pgaudit.org/) | 16.1 | provides detailed session or object audit logging via the standard logging facility provided by PostgreSQL | +| [pgAudit set_user :octicons-link-external-16:](https://github.com/pgaudit/set_user)| 4.0.1 | provides an additional layer of logging and control when unprivileged users must escalate themselves to superusers or object owner roles in order to perform needed maintenance tasks.| +| [pgBackRest :octicons-link-external-16:](https://pgbackrest.org/) | 2.48 | a backup and restore solution for PostgreSQL | +|[pgBadger :octicons-link-external-16:](https://github.com/darold/pgbadger) | 12.2 | a fast PostgreSQL Log Analyzer.| +|[PgBouncer :octicons-link-external-16:](https://www.pgbouncer.org/) |1.21.0 | a lightweight connection pooler for PostgreSQL| +| [pg_gather :octicons-link-external-16:](https://github.com/jobinau/pg_gather)| v23 | an SQL script for running the diagnostics of the health of PostgreSQL cluster | +| [pgpool2 :octicons-link-external-16:](https://git.postgresql.org/gitweb/?p=pgpool2.git;a=summary) | 4.4.4 | a middleware between PostgreSQL server and client for high availability, connection pooling and load balancing.| +| [pg_repack :octicons-link-external-16:](https://github.com/reorg/pg_repack) | 1.4.8 | rebuilds PostgreSQL database objects | +| [pg_stat_monitor :octicons-link-external-16:](https://github.com/percona/pg_stat_monitor)|2.0.3 | collects and aggregates statistics for PostgreSQL and provides histogram information.| +| [PostGIS :octicons-link-external-16:](https://github.com/postgis/postgis) | 3.3.4 | a spatial extension for PostgreSQL.| +| [PostgreSQL Common :octicons-link-external-16:](https://salsa.debian.org/postgresql/postgresql-common)| 256 | PostgreSQL database-cluster manager. It provides a structure under which multiple versions of PostgreSQL may be installed and/or multiple clusters maintained at one time.| +|[wal2json :octicons-link-external-16:](https://github.com/eulerto/wal2json) |2.5 | a PostgreSQL logical decoding JSON output plugin| +>>>>>>> 9ee26788... Restructured docs:docs/release-notes-v16.1.md Percona Distribution for PostgreSQL also includes the following packages: @@ -46,6 +63,11 @@ Percona Distribution for PostgreSQL also includes the following packages: | RHEL 8 | `etcd` | 3.3.11 | A consistent, distributed key-value store| | | `python3-python-etcd`| 0.4.5 | A Python client for etcd | +<<<<<<< HEAD:docs/release-notes-v12.17.md Percona Distribution for PostgreSQL is also shipped with the [libpq](https://www.postgresql.org/docs/12/libpq.html) library. It contains "a set of +======= + +Percona Distribution for PostgreSQL is also shipped with the [libpq :octicons-link-external-16:](https://www.postgresql.org/docs/16/libpq.html) library. It contains "a set of +>>>>>>> 9ee26788... Restructured docs:docs/release-notes-v16.1.md library functions that allow client programs to pass queries to the PostgreSQL backend server and to receive the results of these queries." diff --git a/docs/release-notes-v12.17.upd.md b/docs/release-notes-v12.17.upd.md index f7cb836fa..bab309e32 100644 --- a/docs/release-notes-v12.17.upd.md +++ b/docs/release-notes-v12.17.upd.md @@ -5,4 +5,4 @@ Percona Distribution for PostgreSQL is a solution with the collection of tools from PostgreSQL community that are tested to work together and serve to assist you in deploying and managing PostgreSQL. The aim of Percona Distribution for PostgreSQL is to address the operational issues like High-Availability, Disaster Recovery, Security, Spatial data handling, Observability, Performance and Scalability and others that enterprises are facing. -This update of Percona Distribution for PostgreSQL includes the new version of [`pg_stat_monitor` 2.0.4](https://docs.percona.com/pg-stat-monitor/release-notes/2.0.4.html) that fixes the issue with the extension causing the deadlock in the Percona Operator for PostgreSQL when executing the `pgsm_store` function. +This update of Percona Distribution for PostgreSQL includes the new version of [`pg_stat_monitor` 2.0.4 :octicons-link-external-16:](https://docs.percona.com/pg-stat-monitor/release-notes/2.0.4.html) that fixes the issue with the extension causing the deadlock in the Percona Operator for PostgreSQL when executing the `pgsm_store` function. diff --git a/docs/release-notes-v12.18.md b/docs/release-notes-v12.18.md index 3762b97e1..59ce89e62 100644 --- a/docs/release-notes-v12.18.md +++ b/docs/release-notes-v12.18.md @@ -17,6 +17,7 @@ The following is the list of extensions available in Percona Distribution for Po | Extension | Version | Description | | ------------------- | -------------- | ---------------------------- | +<<<<<<< HEAD:docs/release-notes-v12.18.md |[HAProxy](http://www.haproxy.org/) | 2.8.5 | a high-availability and load-balancing solution | | [Patroni](https://patroni.readthedocs.io/en/latest/) | 3.2.2 | a HA (High Availability) solution for PostgreSQL | | [PgAudit](https://www.pgaudit.org/) | 1.4.3 | provides detailed session or object audit logging via the standard logging facility provided by PostgreSQL | @@ -31,6 +32,22 @@ The following is the list of extensions available in Percona Distribution for Po | [PostGIS](https://github.com/postgis/postgis) | 3.3.5 | a spatial extension for PostgreSQL.| | [PostgreSQL Common](https://salsa.debian.org/postgresql/postgresql-common)| 256 | PostgreSQL database-cluster manager. It provides a structure under which multiple versions of PostgreSQL may be installed and/or multiple clusters maintained at one time.| |[wal2json](https://github.com/eulerto/wal2json) |2.5 | a PostgreSQL logical decoding JSON output plugin| +======= +|[HAProxy :octicons-link-external-16:](http://www.haproxy.org/) | 2.8.5 | a high-availability and load-balancing solution | +| [Patroni :octicons-link-external-16:](https://patroni.readthedocs.io/en/latest/) | 3.2.2 | a HA (High Availability) solution for PostgreSQL | +| [PgAudit :octicons-link-external-16:](https://www.pgaudit.org/) | 16 | provides detailed session or object audit logging via the standard logging facility provided by PostgreSQL | +| [pgAudit set_user :octicons-link-external-16:](https://github.com/pgaudit/set_user)| 4.0.1 | provides an additional layer of logging and control when unprivileged users must escalate themselves to superusers or object owner roles in order to perform needed maintenance tasks.| +| [pgBackRest :octicons-link-external-16:](https://pgbackrest.org/) | 2.50 | a backup and restore solution for PostgreSQL | +|[pgBadger :octicons-link-external-16:](https://github.com/darold/pgbadger) | 12.4 | a fast PostgreSQL Log Analyzer.| +|[PgBouncer :octicons-link-external-16:](https://www.pgbouncer.org/) |1.22.0 | a lightweight connection pooler for PostgreSQL| +| [pg_gather :octicons-link-external-16:](https://github.com/jobinau/pg_gather)| v25 | an SQL script for running the diagnostics of the health of PostgreSQL cluster | +| [pgpool2 :octicons-link-external-16:](https://git.postgresql.org/gitweb/?p=pgpool2.git;a=summary) | 4.5.0 | a middleware between PostgreSQL server and client for high availability, connection pooling and load balancing.| +| [pg_repack :octicons-link-external-16:](https://github.com/reorg/pg_repack) | 1.5.0 | rebuilds PostgreSQL database objects | +| [pg_stat_monitor :octicons-link-external-16:](https://github.com/percona/pg_stat_monitor)|2.0.4 | collects and aggregates statistics for PostgreSQL and provides histogram information.| +| [PostGIS :octicons-link-external-16:](https://github.com/postgis/postgis) | 3.3.5 | a spatial extension for PostgreSQL.| +| [PostgreSQL Common :octicons-link-external-16:](https://salsa.debian.org/postgresql/postgresql-common)| 256 | PostgreSQL database-cluster manager. It provides a structure under which multiple versions of PostgreSQL may be installed and/or multiple clusters maintained at one time.| +|[wal2json :octicons-link-external-16:](https://github.com/eulerto/wal2json) |2.5 | a PostgreSQL logical decoding JSON output plugin| +>>>>>>> 9ee26788... Restructured docs:docs/release-notes-v16.2.md Percona Distribution for PostgreSQL also includes the following packages: @@ -43,6 +60,11 @@ Percona Distribution for PostgreSQL also includes the following packages: | RHEL 8 | `etcd` | 3.5.12 | A consistent, distributed key-value store| | | `python3-python-etcd`| 0.4.5 | A Python client for etcd | +<<<<<<< HEAD:docs/release-notes-v12.18.md Percona Distribution for PostgreSQL is also shipped with the [libpq](https://www.postgresql.org/docs/12/libpq.html) library. It contains "a set of +======= + +Percona Distribution for PostgreSQL is also shipped with the [libpq :octicons-link-external-16:](https://www.postgresql.org/docs/16/libpq.html) library. It contains "a set of +>>>>>>> 9ee26788... Restructured docs:docs/release-notes-v16.2.md library functions that allow client programs to pass queries to the PostgreSQL backend server and to receive the results of these queries." diff --git a/docs/solutions.md b/docs/solutions.md new file mode 100644 index 000000000..dcaa787df --- /dev/null +++ b/docs/solutions.md @@ -0,0 +1,30 @@ +# Percona Distribution for PostgreSQL solutions + +Find the right solution to help you achieve your organization's goals. + +
+ +### :material-clock-check-outline: High availability + +Check out how you can ensure continuous access to your database. + +[High availability :material-arrow-right:](solutions/high-availability.md){.md-button} + +
+ +### :octicons-globe-24: Spatial data handling + +Dealing with spatial data? Learn how you can store and manipulate it. + +[Spatial data handling :material-arrow-right:](solutions/postgis.md){.md-button} + +
+ +### :material-backup-restore: Backup and disaster recovery + +Protect your database against accidental or malicious data loss or data corruption. + +[Backup and disaster recovery :material-arrow-right:](solutions/backup-recovery.md){.md-button} + +
+
\ No newline at end of file diff --git a/docs/solutions/backup-recovery.md b/docs/solutions/backup-recovery.md index ab8b7b649..58a86d4a5 100644 --- a/docs/solutions/backup-recovery.md +++ b/docs/solutions/backup-recovery.md @@ -21,9 +21,9 @@ A Disaster Recovery (DR) solution ensures that a system can be quickly restored
PostgreSQL offers multiple options for setting up database disaster recovery. - - **[pg_dump](https://www.postgresql.org/docs/12/app-pgdump.html) or the [pg_dumpall](https://www.postgresql.org/docs/12/app-pg-dumpall.html) utilities** + - **[pg_dump :octicons-link-external-16:](https://www.postgresql.org/docs/12/app-pgdump.html) or the [pg_dumpall :octicons-link-external-16:](https://www.postgresql.org/docs/12/app-pg-dumpall.html) utilities** - This is the basic backup approach. These tools can generate the backup of one or more PostgreSQL databases (either just the structure, or both the structure and data), then restore them through the [pg_restore](https://www.postgresql.org/docs/12/app-pgrestore.html) command. + This is the basic backup approach. These tools can generate the backup of one or more PostgreSQL databases (either just the structure, or both the structure and data), then restore them through the [pg_restore :octicons-link-external-16:](https://www.postgresql.org/docs/12/app-pgrestore.html) command. | Advantages | Disadvantages | | ------------ | --------------- | @@ -37,7 +37,7 @@ A Disaster Recovery (DR) solution ensures that a system can be quickly restored | ------------ | --------------- | | Consistent snapshot of the data directory or the whole data disk volume | 1. Requires stopping PostgreSQL in order to copy the files. This is not practical for most production setups.
2. No backup of individual databases or tables.| - - **PostgreSQL [pg_basebackup](https://www.postgresql.org/docs/12/app-pgbasebackup.html)** + - **PostgreSQL [pg_basebackup :octicons-link-external-16:](https://www.postgresql.org/docs/12/app-pgbasebackup.html)** This backup tool is provided by PostgreSQL. It is used to back up data when the database instance is running. `pgasebackup` makes a binary copy of the database cluster files, while making sure the system is put in and out of backup mode automatically. @@ -52,7 +52,7 @@ This document focuses on the Disaster recovery solution in Percona Distribution ### pgBackRest -[pgBackRest](https://pgbackrest.org/) is an easy-to-use, open-source solution that can reliably back up even the largest of PostgreSQL databases. `pgBackRest` supports the following backup types: +[pgBackRest :octicons-link-external-16:](https://pgbackrest.org/) is an easy-to-use, open-source solution that can reliably back up even the largest of PostgreSQL databases. `pgBackRest` supports the following backup types: * full backup - a complete copy of your entire data set. * differential backup - includes all data that has changed since the last full backup. While this means the backup time is slightly higher, it enables a faster restore. @@ -76,7 +76,7 @@ As the configuration example, we will use a three server architecture where `pgB !!! important - Passwordless SSH may not be an ideal solution for your environment. In this case, consider using other methods, for example, [TLS with client certificates](https://pgbackrest.org/user-guide-rhel.html#repo-host/config). + Passwordless SSH may not be an ideal solution for your environment. In this case, consider using other methods, for example, [TLS with client certificates :octicons-link-external-16:](https://pgbackrest.org/user-guide-rhel.html#repo-host/config). The following diagram illustrates the architecture layout: diff --git a/docs/solutions/dr-pgbackrest-setup.md b/docs/solutions/dr-pgbackrest-setup.md index bf76bd789..10b50f2c4 100644 --- a/docs/solutions/dr-pgbackrest-setup.md +++ b/docs/solutions/dr-pgbackrest-setup.md @@ -137,7 +137,7 @@ Before setting up passwordless SSH, ensure that the _postgres_ user in all three Install Percona Distribution for PostgreSQL in the primary and the secondary nodes from Percona repository. -1. [Install `percona-release`](https://www.percona.com/doc/percona-repo-config/installing.html). +1. [Install `percona-release` :octicons-link-external-16:](https://www.percona.com/doc/percona-repo-config/installing.html). 2. Enable the repository: ```{.bash data-prompt="$"} @@ -146,13 +146,13 @@ Install Percona Distribution for PostgreSQL in the primary and the secondary nod 3. Install Percona Distribution for PostgreSQL packages - === "On Debian and Ubuntu" + === ":material-debian: On Debian and Ubuntu" ```{.bash data-prompt="$"} $ sudo apt install percona-postgresql-12 -y ``` - === "On RedHat Enterprise Linux and derivatives" + === ":material-redhat: On RedHat Enterprise Linux and derivatives" ```{.bash data-prompt="$"} $ sudo yum install percona-postgresql12-server @@ -190,13 +190,13 @@ At this step, configure the PostgreSQL instance on the `pg-primary` node for con Install `pgBackRest` in all three instances from Percona repository. Use the following command: -=== "On Debian / Ubuntu" +=== ":material-debian: On Debian / Ubuntu" ```{.bash data-prompt="$"} $ sudo apt-get install percona-pgbackrest ``` -=== "On RHEL / derivatives" +=== ":material-redhat: On RHEL / derivatives" ```{.bash data-prompt="$"} $ sudo yum install percona-pgbackrest diff --git a/docs/solutions/ha-setup-apt.md b/docs/solutions/ha-setup-apt.md index 82f7c45cd..83e2ba964 100644 --- a/docs/solutions/ha-setup-apt.md +++ b/docs/solutions/ha-setup-apt.md @@ -82,7 +82,7 @@ Run the following commands on node1`, `node2` and `node3`: 1. Install Percona Distribution for PostgreSQL - * [Install `percona-release`](https://www.percona.com/doc/percona-repo-config/installing.html). + * [Install `percona-release` :octicons-link-external-16:](https://www.percona.com/doc/percona-repo-config/installing.html). * Enable the repository: diff --git a/docs/solutions/ha-setup-yum.md b/docs/solutions/ha-setup-yum.md index 84158292a..0a2278722 100644 --- a/docs/solutions/ha-setup-yum.md +++ b/docs/solutions/ha-setup-yum.md @@ -80,14 +80,14 @@ It's not necessary to have name resolution, but it makes the whole setup more re 1. Install Percona Distribution for PostgreSQL on `node1`, `node2` and `node3` from Percona repository: - * [Install `percona-release`](https://www.percona.com/doc/percona-repo-config/installing.html). + * [Install `percona-release` :octicons-link-external-16:](https://www.percona.com/doc/percona-repo-config/installing.html). * Enable the repository: ```{.bash data-prompt="$"} $ sudo percona-release setup ppg12 ``` - * [Install Percona Distribution for PostgreSQL packages](../installing.md#on-red-hat-enterprise-linux-and-centos-using-yum). + * [Install Percona Distribution for PostgreSQL packages](../yum.md). !!! important diff --git a/docs/solutions/high-availability.md b/docs/solutions/high-availability.md index 1e9b6fbd7..9f32cb3fd 100644 --- a/docs/solutions/high-availability.md +++ b/docs/solutions/high-availability.md @@ -1,6 +1,6 @@ # High Availability in PostgreSQL with Patroni -PostgreSQL has been widely adopted as a modern, high-performance transactional database. A highly available PostgreSQL cluster can withstand failures caused by network outages, resource saturation, hardware failures, operating system crashes or unexpected reboots. Such cluster is often a critical component of the enterprise application landscape, where [four nines of availability](https://en.wikipedia.org/wiki/High_availability#Percentage_calculation) is a minimum requirement. +PostgreSQL has been widely adopted as a modern, high-performance transactional database. A highly available PostgreSQL cluster can withstand failures caused by network outages, resource saturation, hardware failures, operating system crashes or unexpected reboots. Such cluster is often a critical component of the enterprise application landscape, where [four nines of availability :octicons-link-external-16:](https://en.wikipedia.org/wiki/High_availability#Percentage_calculation) is a minimum requirement. There are several methods to achieve high availability in PostgreSQL. This solution document provides [Patroni](#patroni) - the open-source extension to facilitate and manage the deployment of high availability in PostgreSQL. @@ -34,11 +34,11 @@ There are several methods to achieve high availability in PostgreSQL. This solut To address these shortcomings, there are a multitude of third-party, open-source extensions for PostgreSQL. The challenge for a database administrator here is to select the right utility for the current scenario. - Percona Distribution for PostgreSQL solves this challenge by providing the [Patroni](https://patroni.readthedocs.io/en/latest/) extension for achieving PostgreSQL high availability. + Percona Distribution for PostgreSQL solves this challenge by providing the [Patroni :octicons-link-external-16:](https://patroni.readthedocs.io/en/latest/) extension for achieving PostgreSQL high availability. ## Patroni -[Patroni](https://patroni.readthedocs.io/en/latest/) is a template for you to create your own customized, high-availability solution using Python and - for maximum accessibility - a distributed configuration store like ZooKeeper, etcd, Consul or Kubernetes. +[Patroni :octicons-link-external-16:](https://patroni.readthedocs.io/en/latest/) is a template for you to create your own customized, high-availability solution using Python and - for maximum accessibility - a distributed configuration store like ZooKeeper, etcd, Consul or Kubernetes. ### Key benefits of Patroni: diff --git a/docs/solutions/pgbackrest.md b/docs/solutions/pgbackrest.md index 62aa9cc6e..112d40e51 100644 --- a/docs/solutions/pgbackrest.md +++ b/docs/solutions/pgbackrest.md @@ -1,6 +1,6 @@ # pgBackRest setup -[pgBackRest](https://pgbackrest.org/) is a backup tool used to perform PostgreSQL database backup, archiving, restoration, and point-in-time recovery. While it can be used for local backups, this procedure shows how to deploy a [pgBackRest server running on a dedicated host](https://pgbackrest.org/user-guide-rhel.html#repo-host) and how to configure PostgreSQL servers to use it for backups and archiving. +[pgBackRest :octicons-link-external-16:](https://pgbackrest.org/) is a backup tool used to perform PostgreSQL database backup, archiving, restoration, and point-in-time recovery. While it can be used for local backups, this procedure shows how to deploy a [pgBackRest server running on a dedicated host :octicons-link-external-16:](https://pgbackrest.org/user-guide-rhel.html#repo-host) and how to configure PostgreSQL servers to use it for backups and archiving. You also need a backup storage to store the backups. It can either be a remote storage such as AWS S3, S3-compatible storages or Azure blob storage, or a filesystem-based one. @@ -14,7 +14,7 @@ $ sudo su - ### Install pgBackRest -1. Enable the repository with [percona-release](https://www.percona.com/doc/percona-repo-config/index.html) +1. Enable the repository with [percona-release :octicons-link-external-16:](https://www.percona.com/doc/percona-repo-config/index.html) ```{.bash data-prompt="$"} $ percona-release setup ppg-{{pgversion}} @@ -22,13 +22,13 @@ $ sudo su - 2. Install pgBackRest package - === "Debian/Ubuntu" + === ":material-debian: On Debian andUbuntu" ```{.bash data-prompt="$"} $ apt install percona-pgbackrest ``` - === "RHEL/derivatives" + === " :material-redhat: On RHEL/derivatives" ```{.bash data-prompt="$"} $ yum install percona-pgbackrest @@ -309,13 +309,13 @@ Run the following commands on `node1`, `node2`, and `node3`. 1. Install pgBackRest package - === "Debian/Ubuntu" + === ":material-debian: On Debian/Ubuntu" ```{.bash data-prompt="$"} $ apt install percona-pgbackrest ``` - === "RHEL/derivatives" + === ":material-redhat: On RHEL/derivatives" ```{.bash data-prompt="$"} $ yum install percona-pgbackrest diff --git a/docs/solutions/postgis-deploy.md b/docs/solutions/postgis-deploy.md index 5eb2baa58..9039eb7b0 100644 --- a/docs/solutions/postgis-deploy.md +++ b/docs/solutions/postgis-deploy.md @@ -5,16 +5,16 @@ The following document provides guidelines how to install PostGIS and how to run ## Considerations 1. We assume that you have the basic knowledge of spatial data, GIS (Geographical Information System) and of shapefiles. -2. For uploading the spatial data and querying the database, we use the same [data set](https://s3.amazonaws.com/s3.cleverelephant.ca/postgis-workshop-2020.zip) as is used in [PostGIS tutorial](http://postgis.net/workshops/postgis-intro/). +2. For uploading the spatial data and querying the database, we use the same [data set :octicons-link-external-16:](https://s3.amazonaws.com/s3.cleverelephant.ca/postgis-workshop-2020.zip) as is used in [PostGIS tutorial :octicons-link-external-16:](http://postgis.net/workshops/postgis-intro/). ## Install PostGIS -=== "On Debian and Ubuntu" +=== ":material-debian: On Debian and Ubuntu" 1. Enable Percona repository - As other components of Percona Distribution for PostgreSQL, PostGIS is available from Percona repositories. Use the [`percona-release`](https://docs.percona.com/percona-software-repositories/installing.html) repository management tool to enable the repository. + As other components of Percona Distribution for PostgreSQL, PostGIS is available from Percona repositories. Use the [`percona-release` :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html) repository management tool to enable the repository. ```{.bash data-prompt="$"} $ sudo percona-release setup ppg{{pgversion}} @@ -41,13 +41,13 @@ The following document provides guidelines how to install PostGIS and how to run $ sudo apt-get install libsfcgal1 ``` -=== "On RHEL and derivatives" +=== ":material-redhat: On RHEL and derivatives" 1. Check the [Platform specific notes](../yum.md#for-postgis) and enable required repositories and modules for the dependencies relevant to your operating system. 2. Enable Percona repository - As other components of Percona Distribution for PostgreSQL, PostGIS is available from Percona repositories. Use the [`percona-release`](https://docs.percona.com/percona-software-repositories/installing.html) repository management tool to enable the repository. + As other components of Percona Distribution for PostgreSQL, PostGIS is available from Percona repositories. Use the [`percona-release` :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html) repository management tool to enable the repository. ```{.bash data-prompt="$"} $ sudo percona-release setup ppg{{pgversion}} @@ -123,7 +123,7 @@ PostGIS provides the `shp2pgsql` command line utility that converts the binary d * `-D` flag instructs the command to generate the dump format * `-I` flag instructs to create the spatial index on the table upon the data load - * `-s` indicates the [spatial reference identifier](https://en.wikipedia.org/wiki/Spatial_reference_system) of the data. The data we load is in the Projected coordinate system for North America and has the value 26918. + * `-s` indicates the [spatial reference identifier :octicons-link-external-16:](https://en.wikipedia.org/wiki/Spatial_reference_system) of the data. The data we load is in the Projected coordinate system for North America and has the value 26918. * `nyc_streets.shp` is the source shapefile * `nyc_streets` is the table name to create in the database * `dbname=nyc` is the database name diff --git a/docs/solutions/postgis-upgrade.md b/docs/solutions/postgis-upgrade.md index d6053d658..51a4b9810 100644 --- a/docs/solutions/postgis-upgrade.md +++ b/docs/solutions/postgis-upgrade.md @@ -13,13 +13,13 @@ The spatial database upgrade consists of two steps: ## Upgrade PostGIS -Each version of PostGIS is compatible with several versions of PostgreSQL and vise versa. The best practice is to first upgrade the PostGIS extension on the source cluster to match the compatible version on the target cluster and then upgrade PostgreSQL. Please see the [PostGIS Support matrix](https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS#PostGISSupportMatrix) for version compatibility. +Each version of PostGIS is compatible with several versions of PostgreSQL and vise versa. The best practice is to first upgrade the PostGIS extension on the source cluster to match the compatible version on the target cluster and then upgrade PostgreSQL. Please see the [PostGIS Support matrix :octicons-link-external-16:](https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS#PostGISSupportMatrix) for version compatibility. PostGIS is enabled on the database level. This means that the upgrade is also done on the database level. === "PostGIS 3 and above" - Connect to the database where it is enabled and run the [`PostGIS_Extensions_Upgrade()`](https://postgis.net/docs/PostGIS_Extensions_Upgrade.html) function: + Connect to the database where it is enabled and run the [`PostGIS_Extensions_Upgrade()` :octicons-link-external-16:](https://postgis.net/docs/PostGIS_Extensions_Upgrade.html) function: ```sql SELECT postgis_extensions_upgrade(); @@ -50,4 +50,4 @@ PostGIS is enabled on the database level. This means that the upgrade is also do Upgrade PostgreSQL either to the [latest minor](../minor-upgrade.md) or to the [major version](../major-upgrade.md). -If you are using long deprecated views and functions and / or need the expertise in upgrading your spatial database, [contact Percona Managed Services](https://www.percona.com/services/managed-services) for an individual upgrade scenario development. +If you are using long deprecated views and functions and / or need the expertise in upgrading your spatial database, [contact Percona Managed Services :octicons-link-external-16:](https://www.percona.com/services/managed-services) for an individual upgrade scenario development. diff --git a/docs/solutions/postgis.md b/docs/solutions/postgis.md index 675d440d4..f27974077 100644 --- a/docs/solutions/postgis.md +++ b/docs/solutions/postgis.md @@ -7,7 +7,7 @@ Organizations dealing with spatial data need to store it somewhere and manipulat * Geographical data like points, lines, polygons, GPS coordinates that can be mapped on a sphere. * Geometrical data. This is also points, lines and polygons but they apply to a 2D surface. -To operate with spatial data inside SQL queries, PostGIS supports [spatial functions](https://postgis.net/docs/reference.html#SRS_Functions) like distance, area, union, intersection. It uses the spatial indexes like [R-Tree](https://en.wikipedia.org/wiki/R-tree) and [Quadtree](https://en.wikipedia.org/wiki/Quadtree) for efficient processing of database operations. Read more about supported spatial functions and indexes in [PostGIS documentation](https://postgis.net/workshops/postgis-intro/introduction.html). +To operate with spatial data inside SQL queries, PostGIS supports [spatial functions :octicons-link-external-16:](https://postgis.net/docs/reference.html#SRS_Functions) like distance, area, union, intersection. It uses the spatial indexes like [R-Tree :octicons-link-external-16:](https://en.wikipedia.org/wiki/R-tree) and [Quadtree :octicons-link-external-16:](https://en.wikipedia.org/wiki/Quadtree) for efficient processing of database operations. Read more about supported spatial functions and indexes in [PostGIS documentation :octicons-link-external-16:](https://postgis.net/workshops/postgis-intro/introduction.html). By deploying PostGIS with Percona Distribution for PostgreSQL, you receive the open source spatial database that you can use in various areas without vendor lock-in. @@ -24,7 +24,7 @@ You can use PostGIS in the following cases: Despite its power and flexibility, PostGIS may not suit your needs if: -* You need to store only a couple of map locations. Consider using the [built-in geometric functions and operations of PostgreSQL](https://www.postgresql.org/docs/current/functions-geometry.html) +* You need to store only a couple of map locations. Consider using the [built-in geometric functions and operations of PostgreSQL :octicons-link-external-16:](https://www.postgresql.org/docs/current/functions-geometry.html) * You need real-time data analysis. While PostGIS can handle real-time spatial data, it may not be the best option for real-time data analysis on large volumes of data. * You need complex 3D analysis or visualization. * You need to acquire spatial data. Use other tools for this purpose and import spatial data into PostGIS to manipulate it. diff --git a/docs/trademark-policy.md b/docs/trademark-policy.md index 071dad339..94ff02088 100644 --- a/docs/trademark-policy.md +++ b/docs/trademark-policy.md @@ -1,6 +1,6 @@ # Trademark Policy -This [Trademark Policy](https://www.percona.com/trademark-policy) is to ensure that users of Percona-branded products or +This [Trademark Policy :octicons-link-external-16:](https://www.percona.com/trademark-policy) is to ensure that users of Percona-branded products or services know that what they receive has really been developed, approved, tested and maintained by Percona. Trademarks help to prevent confusion in the marketplace, by distinguishing one company’s or person’s products and services diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md new file mode 100644 index 000000000..136737ff9 --- /dev/null +++ b/docs/troubleshooting.md @@ -0,0 +1,23 @@ +# Troubleshooting guide + +## Cannot create a table. Permission denied in schema `public` + +Every database in PostgreSQL has a default schema called `public`. A schema stores database objects like tables, views, indexes and allows organizing them into logical groups. + +When you create a table without specifying a schema name, it ends up in the `public` schema by default. + +Starting with PostgreSQL 15, non-database owners cannot access the `public` schema. Therefore, you can either grant privileges to the database for your user using the [GRANT](https://www.postgresql.org/docs/{{pgvesrion}}/sql-grant.html) command or create your own schema to insert the data. + +To create a schema, use the following statement: + +```sql +CREATE SCHEMA demo; +``` + +To ensure all tables end up in your newly created schema, use the following statement ot set the schema: + +```sql +CREATE SCHEMA demo; +``` + +Replace the `demo` name with your value. diff --git a/docs/uninstalling.md b/docs/uninstalling.md index 6d6065bfa..b4f6c4e60 100644 --- a/docs/uninstalling.md +++ b/docs/uninstalling.md @@ -4,9 +4,10 @@ To uninstall Percona Distribution for PostgreSQL, remove all the installed packa **NOTE**: Should you need the data files later, back up your data before uninstalling Percona Distribution for PostgreSQL. -=== "On Debian and Ubuntu using `apt`" +=== ":material-debian: On Debian and Ubuntu using `apt`" Run all commands as root or via **sudo**. + {.power-number} 1. Stop the Percona Distribution for PostgreSQL service. @@ -29,9 +30,10 @@ To uninstall Percona Distribution for PostgreSQL, remove all the installed packa $ rm -rf /etc/postgresql/12/main ``` -=== "On Red Hat Enterprise Linux and derivatives using `yum`" +=== ":material-redhat: On Red Hat Enterprise Linux and derivatives using `yum`" Run all commands as root or via **sudo**. + {.power-number} 1. Stop the Percona Distribution for PostgreSQL service. diff --git a/docs/whats-next.md b/docs/whats-next.md new file mode 100644 index 000000000..3d18085a7 --- /dev/null +++ b/docs/whats-next.md @@ -0,0 +1,25 @@ +# What's next? + +You've just had your first hands-on experience with PostgreSQL! That's a great start. + +To become more confident and proficient in developing database applications, let's expand your knowledge and skills in using PostgreSQL. Dive deeper into these key topics to solidify your PostgreSQL skills: + +- [SQL Syntax :octicons-link-external-16:](https://www.postgresql.org/docs/current/sql-syntax.html) +- [Data definition :octicons-link-external-16:](https://www.postgresql.org/docs/current/ddl.html) +- [Queries :octicons-link-external-16:](https://www.postgresql.org/docs/current/queries.html) +- [Functions and Operators :octicons-link-external-16:](https://www.postgresql.org/docs/current/functions.html) +- [Indexes :octicons-link-external-16:](https://www.postgresql.org/docs/current/indexes.html) + + +To effectively solve database administration tasks, master these essential topics: + +- [Backup and restore :octicons-link-external-16:](https://www.postgresql.org/docs/current/backup.html) +- [Authentication :octicons-link-external-16:](https://www.postgresql.org/docs/{{pgversion}}/auth-methods.html) and role-based access control +- [PostgreSQL contrib extensions and modules](contrib.md) +- [Monitor PostgreSQL with Percona Monitoring and Management :octicons-link-external-16:](https://docs.percona.com/percona-monitoring-and-management/quickstart/index.html) + + +Also, check out our solutions to help you meet the requirements of your organization. + +[Solutions](solutions.md){.md-button} + diff --git a/docs/yum.md b/docs/yum.md index 943de8542..f099a4551 100644 --- a/docs/yum.md +++ b/docs/yum.md @@ -1,7 +1,6 @@ # Install Percona Distribution for PostgreSQL on Red Hat Enterprise Linux and derivatives - -This document describes how to install Percona Distribution for PostgreSQL from Percona repositories on RPM-based distributions such as Red Hat Enterprise Linux and compatible derivatives. +This document describes how to install Percona Distribution for PostgreSQL from Percona repositories on RPM-based distributions such as Red Hat Enterprise Linux and compatible derivatives. [Read more about Percona repositories](repo-overview.md). ## Platform specific notes @@ -104,7 +103,10 @@ The following commands provide instructions how to enable required repositories For Red Hat Enterprise Linux 8 and derivatives, replace the operating system version in the commands accordingly. -=== "RHEL 9" +=== "RHEL 9" + + Run the following commands: + {.power-number} 1. Install `epel` repository @@ -126,6 +128,9 @@ For Red Hat Enterprise Linux 8 and derivatives, replace the operating system ver === "Rocky Linux 9" + Run the following commands: + {.power-number} + 1. Install `epel` repository ```{.bash data-prompt="$"} @@ -147,6 +152,9 @@ For Red Hat Enterprise Linux 8 and derivatives, replace the operating system ver === "Oracle Linux 9" + Run the following commands: + {.power-number} + 1. Install `epel` repository ```{.bash data-prompt="$"} @@ -167,6 +175,9 @@ For Red Hat Enterprise Linux 8 and derivatives, replace the operating system ver === "RHEL UBI 9" + Run the following commands: + {.power-number} + 1. Configure the Oracle-Linux repository. Create the `/etc/yum.repos.d/oracle-linux-ol9.repo` file to install the required dependencies: ```init title="/etc/yum.repos.d/oracle-linux-ol9.repo" @@ -216,7 +227,7 @@ Install `curl` for [Telemetry](telemetry.md). We use it to better understand the $ sudo yum -y install curl ``` -### Configure the repository +### Configure the repository {.power-number} 1. Install the `percona-release` repository management tool to subscribe to Percona repositories: @@ -243,6 +254,9 @@ $ sudo yum -y install curl ``` === "Install packages individually" + + Run the following commands: + {.power-number} 1. Install the PostgreSQL server package: @@ -346,30 +360,10 @@ Start the PostgreSQL service: $ sudo systemctl start postgresql-{{pgversion}} ``` -### Connect to the PostgreSQL server - -By default, `postgres` user and `postgres` database are created in PostgreSQL upon its installation and initialization. This allows you to connect to the database as the `postgres` user. - -```{.bash data-prompt="$"} -$ sudo su postgres -``` - -Open the PostgreSQL interactive terminal: +Congratulations! Your Percona Distribution for PostgreSQL is up and running. -```{.bash data-prompt="$"} -$ psql -``` +## Next steps -!!! hint +[Enable extensions :material-arrow-right:](enable-extensions.md){.md-button} - You can connect to `psql` as the `postgres` user in one go: - - ```{.bash data-prompt="$"} - $ sudo su - postgres -c psql - ``` - -To exit the `psql` terminal, use the following command: - -```{.bash data-prompt="$"} -$ \q -``` \ No newline at end of file +[Connect to PostgreSQL :material-arrow-right:](connect.md){.md-button} diff --git a/mkdocs-base.yml b/mkdocs-base.yml index 4937fc15e..af3a1664d 100644 --- a/mkdocs-base.yml +++ b/mkdocs-base.yml @@ -157,7 +157,50 @@ extra: postgresrecommended: 16 nav: - - Home: index.md + - 'Home': 'index.md' + - Get started: + - Quickstart guide: installing.md + - 1. Install: + - Via apt: apt.md + - Via yum: yum.md + - Run in Docker: docker.md + - enable-extensions.md + - repo-overview.md + - 2. Connect to PostgreSQL: connect.md + - 3. Manipulate data in PostgreSQL: crud.md + - 4. What's next: whats-next.md + - Extensions: + - 'Extensions': extensions.md + - contrib.md + - Percona-authored extensions: + - 'pg_stat_monitor': 'pg-stat-monitor.md' + - third-party.md + - Solutions: + - Overview: solutions.md + - High availability: + - 'High Availability in PostgreSQL with Patroni': solutions/high-availability.md + - 'Deploying on Debian or Ubuntu': 'solutions/ha-setup-apt.md' + - 'Deploying on RHEL or derivatives': 'solutions/ha-setup-yum.md' + - solutions/pgbackrest.md + - solutions/ha-test.md + - Backup and disaster recovery: + - solutions/backup-recovery.md + - solutions/dr-pgbackrest-setup.md + - Spatial data handling: + - Overview: solutions/postgis.md + - Deployment: solutions/postgis-deploy.md + - Query spatial data: solutions/postgis-testing.md + - Upgrade spatial database: solutions/postgis-upgrade.md + - LDAP authentication: + - ldap.md + - Upgrade: + - "Major upgrade": major-upgrade.md + - minor-upgrade.md + - migration.md + - Troubleshooting guide: troubleshooting.md + - How to: + - how-to.md + - Uninstall: uninstalling.md - Release notes: - "Release notes index": "release-notes.md" - release-notes-v12.19.md @@ -195,43 +238,8 @@ nav: - release-notes-v12.4.md - release-notes-v12.3.md - release-notes-v12.2.md - - Installation and Upgrade: - - Install Percona Distribution for PostgreSQL: - - "Overview": "installing.md" - - "Install via apt": "apt.md" - - "Install via yum": "yum.md" - - enable-extensions.md - - repo-overview.md - - "Run in Docker": docker.md - - migration.md - - major-upgrade.md - - minor-upgrade.md - - Extensions: - - 'Extensions': extensions.md - - contrib.md - - third-party.md - - Percona-authored extensions: - - 'pg_stat_monitor': 'pg-stat-monitor.md' - - Solutions: - - High availability: - - 'High Availability in PostgreSQL with Patroni': solutions/high-availability.md - - 'Deploying on Debian or Ubuntu': 'solutions/ha-setup-apt.md' - - 'Deploying on RHEL or derivatives': 'solutions/ha-setup-yum.md' - - solutions/pgbackrest.md - - solutions/ha-test.md - - Backup and disaster recovery: - - solutions/backup-recovery.md - - solutions/dr-pgbackrest-setup.md - - Spatial data handling: - - Overview: solutions/postgis.md - - Deployment: solutions/postgis-deploy.md - - Query spatial data: solutions/postgis-testing.md - - Upgrade spatial database: solutions/postgis-upgrade.md - - LDAP authentication: - - ldap.md - - Telemetry: telemetry.md - - How to: how-to.md - - Uninstall: uninstalling.md - - Licensing: licensing.md - - Trademark policy: - - trademark-policy.md + - Reference: + - Telemetry: telemetry.md + - Licensing: licensing.md + - Trademark policy: trademark-policy.md + diff --git a/snippets/supported-versions.md b/snippets/supported-versions.md index 78a2a1077..ee4c65856 100644 --- a/snippets/supported-versions.md +++ b/snippets/supported-versions.md @@ -1 +1 @@ -Percona provides installation packages in `DEB` and `RPM` format for 64-bit Linux distributions. Find the full list of supported platforms on the [Percona Software and Platform Lifecycle page](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. Find the full list of supported platforms on the [Percona Software and Platform Lifecycle page :octicons-link-external-16:](https://www.percona.com/services/policies/percona-software-support-lifecycle#pgsql).