├── .github └── workflows │ ├── main.yml │ └── spellcheck.yml ├── .gitignore ├── .python-version ├── .vscode └── settings.json ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── _resource ├── .icons │ ├── edit_page.png │ ├── file-document-edit-outline.svg │ └── percona │ │ ├── logo-postgresql.svg │ │ └── logo.svg ├── overrides │ ├── 404.html │ ├── main.html │ └── partials │ │ ├── banner.html │ │ ├── copyright.html │ │ └── header.html ├── templates │ └── styles.scss └── theme │ └── main.html ├── _resourcepdf └── overrides │ ├── 404.html │ ├── main.html │ └── partials │ ├── banner.html │ ├── copyright.html │ └── header.html ├── docs ├── _images │ ├── PPG_links.png │ ├── Percona_Logo_Color.png │ ├── diagrams │ │ ├── DR-architecture.png │ │ ├── Spatial-data-arch.png │ │ ├── ha-architecture-patroni.png │ │ └── patroni-architecture.png │ ├── postgresql-fav.svg │ ├── postgresql-mark.svg │ └── postgresql.png ├── apt.md ├── connect.md ├── contrib.md ├── crud.md ├── css │ ├── design.css │ ├── extra.css │ ├── landing.css │ ├── osano.css │ ├── percona.css │ ├── postgresql.css │ └── toctree.css ├── docker.md ├── enable-extensions.md ├── extensions.md ├── fonts │ ├── Poppins-Italic.ttf │ ├── Poppins-Light.ttf │ ├── Poppins-LightItalic.ttf │ ├── Poppins-Medium.ttf │ ├── Poppins-MediumItalic.ttf │ ├── Poppins-Regular.ttf │ ├── Poppins-SemiBold.ttf │ └── Poppins-SemiBoldItalic.ttf ├── get-help.md ├── index.md ├── installing.md ├── js │ ├── consent.js │ ├── promptremover.js │ └── version-select.js ├── ldap.md ├── licensing.md ├── major-upgrade.md ├── migration.md ├── minor-upgrade.md ├── percona-ext.md ├── postgresql-server.md ├── release-notes-v17.0.md ├── release-notes-v17.2.md ├── release-notes-v17.4.md ├── release-notes-v17.5.md ├── release-notes.md ├── repo-overview.md ├── solutions.md ├── solutions │ ├── backup-recovery.md │ ├── dr-pgbackrest-setup.md │ ├── ha-setup-apt.md │ ├── ha-setup-yum.md │ ├── ha-test.md │ ├── high-availability.md │ ├── pgbackrest.md │ ├── postgis-deploy.md │ ├── postgis-testing.md │ ├── postgis-upgrade.md │ └── postgis.md ├── tarball.md ├── telemetry.md ├── templates │ └── pdf_cover_page.tpl ├── third-party.md ├── trademark-policy.md ├── troubleshooting.md ├── uninstalling.md ├── whats-next.md └── yum.md ├── mkdocs-base.yml ├── mkdocs-pdf.yml ├── mkdocs.yml ├── requirements.txt ├── runtime.txt ├── snippets ├── check-etcd.md ├── percona-release-apt.md ├── percona-release-yum.md ├── release-notes-intro.md └── supported-versions.md └── variables.yml /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build Percona Distribution PostgreSQL 17 docs 2 | on: 3 | push: 4 | branches: 5 | - 17 6 | 7 | jobs: 8 | build: 9 | name: Deploy docs 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | #Pull the latest changes 14 | - name: Chekout code 15 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 16 | with: 17 | fetch-depth: 0 18 | #Prepare the env 19 | - name: Set up Python 20 | uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 21 | with: 22 | python-version: '3.x' 23 | 24 | #Configure git 25 | - name: Configure git 26 | env: 27 | ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} 28 | run: | 29 | git config --global url."https://percona-platform-robot:${ROBOT_TOKEN}@github.com".insteadOf "https://github.com" 30 | git config user.name "GitHub Action" 31 | git config user.email "github-action@users.noreply.github.com" 32 | git config user.password "${ROBOT_TOKEN}" 33 | echo "GIT_USER=percona-platform-robot:${ROBOT_TOKEN}" >> $GITHUB_ENV 34 | 35 | #Set up MkDocs 36 | - name: Install MkDocs 37 | run: | 38 | python -m pip install --upgrade pip 39 | pip install wheel 40 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 41 | 42 | # Deploy docs 43 | - name: Deploy docs 44 | run: | 45 | mike deploy 17 -b publish -p 46 | mike set-default 17 -b publish -p 47 | mike retitle 17 "17 (LATEST)" -b publish -p 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /.github/workflows/spellcheck.yml: -------------------------------------------------------------------------------- 1 | name: Check spelling in Percona Distribution PostgreSQL 17 docs 2 | on: 3 | pull_request: 4 | branches: 5 | - 17 6 | 7 | jobs: 8 | build: 9 | name: Check spelling 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | #Pull the latest changes 14 | - name: Chekout code 15 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 16 | with: 17 | fetch-depth: 0 18 | #Prepare the env 19 | - name: Set up Python 20 | uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 21 | with: 22 | python-version: '3.x' 23 | 24 | #Configure git 25 | - name: Configure git 26 | env: 27 | ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} 28 | run: | 29 | git config --global url."https://percona-platform-robot:${ROBOT_TOKEN}@github.com".insteadOf "https://github.com" 30 | git config user.name "GitHub Action" 31 | git config user.email "github-action@users.noreply.github.com" 32 | git config user.password "${ROBOT_TOKEN}" 33 | echo "GIT_USER=percona-platform-robot:${ROBOT_TOKEN}" >> $GITHUB_ENV 34 | 35 | - name: Install Node.js 14.x 36 | uses: percona-platform/setup-node@v2 37 | with: 38 | node-version: "14" 39 | 40 | - name: Spelling 41 | run: | 42 | npx markdown-spellcheck --report --en-us --ignore-acronyms --ignore-numbers "docs/**/*.md" || true 43 | # Ignore errors, just inspect results 44 | 45 | - name: Grammar 46 | run: | 47 | npx write-good --no-passive docs/**/*.md || true 48 | # Ignore errors, just inspect results -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | build/ 3 | source/ext/psdom.pyc 4 | source/ext/__pycache__/ 5 | source/percona-theme/ 6 | source/__pycache__/ 7 | # Local Netlify folder 8 | .netlify 9 | site/ 10 | **/.DS_Store 11 | 12 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.11.1 2 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "Quickstart" 4 | ] 5 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guide 2 | 3 | Thank you for deciding to contribute and help us improve Percona Distribution for PostgreSQL documentation! 4 | 5 | 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). 6 | 7 | You can contribute to documentation in the following ways: 8 | 9 | 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. 10 | 11 | - Click the **Submit DOC bug** link on the sidebar. This opens the [Jira issue tracker](https://jira.percona.com/projects/PG/issues) for the doc project. 12 | - Sign in (create a Jira account if you don’t have one) and click **Create** to create an issue. 13 | - Describe the issue you have detected in the Summary, Description, Steps To Reproduce, Affects Version fields. 14 | 15 | 2. **[Contribute to documentation yourself](#contribute-to-documentation-yourself)**. Click the **Edit this page** icon 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. 16 | 17 | 18 | ## Contribute to documentation yourself 19 | 20 | To contribute to the documentation, you should be familiar with the following technologies: 21 | - [Markdown](https://www.markdownguide.org/basic-syntax/) markup language. It is used to write the documentation. 22 | - [MkDocs](https://www.mkdocs.org/getting-started/) documentation generator. We use it to convert source ``.md`` files to html and PDF documents. 23 | - [git](https://git-scm.com/) and [GitHub](https://guides.github.com/activities/hello-world/) 24 | - [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. 25 | 26 | There are several active versions of the documentation. Each version derives from the major version of PostgreSQL, included in the distribution. 27 | 28 | Each version has a branch in the repository named accordingly: 29 | 30 | - 11 (EOL) 31 | - 12 (EOL) 32 | - 13 33 | - 14 34 | - 15 35 | - 16 36 | - 17 37 | 38 | The source .md files are in the ``docs`` directory. 39 | 40 | ### Edit documentation online via GitHub 41 | 42 | 1. Click the **Edit this page** icon next to the page title. The Markdown file of the page opens in GitHub editor in your browser. If you haven’t worked with the repository before, GitHub creates a [fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) of it for you. 43 | 44 | 2. Edit the page. You can check your changes on the **Preview** tab. 45 | 46 | 3. Commit your changes. 47 | 48 | - In the *Commit changes* section, describe your changes. 49 | - Select the **Create a new branch for this commit and start a pull request** option 50 | - Click **Propose changes**. 51 | 52 | 4. GitHub creates a branch and a commit for your changes. It loads a new page on which you can open a pull request to Percona. The page shows the base branch - the one you offer your changes for, your commit message and a diff - a visual representation of your changes against the original page. This allows you to make a last-minute review. When you are ready, click the **Create pull request** button. 53 | 5. Someone from our team reviews the pull request and if everything is correct, merges it into the documentation. Then it gets published on the site. 54 | 55 | ### Edit documentation locally 56 | 57 | This option is for users who prefer to work from their computer and / or have the full control over the documentation process. 58 | 59 | The steps are the following: 60 | 61 | 1. Fork this repository 62 | 2. Clone the repository on your machine: 63 | 64 | ```sh 65 | git clone git@github.com:percona/postgresql-docs.git 66 | ``` 67 | 68 | 3. Change the directory to ``postgresql-docs`` and add your local repository: 69 | 70 | ```sh 71 | git remote add git@github.com:/postgresql-docs.git 72 | ``` 73 | 74 | 4. Pull the latest changes 75 | 76 | ```sh 77 | git fetch origin 78 | git merge origin/ 79 | ``` 80 | 81 | Make sure that your local branch and the branch you merge changes from are the same. So if you are on the ``17`` branch, merge changes from ``origin/17``. 82 | 83 | 5. Create a separate branch for your changes 84 | 85 | ```sh 86 | git checkout -b 87 | ``` 88 | 89 | 6. Make changes 90 | 7. Commit your changes 91 | 8. Open a pull request to Percona 92 | 93 | ### Building the documentation 94 | 95 | To verify how your changes look, generate the static site with the documentation. This process is called *building*. You can do it in these ways: 96 | - [use Docker](#use-docker) 97 | - [install MkDocs and build locally](#install-mkdocs-and-build-locally) 98 | 99 | Learn more about the documentation structure in the [Repository structure](#repository-stucture) section. 100 | 101 | 102 | #### Use Docker 103 | 104 | 1. [Get Docker](https://docs.docker.com/get-docker/) 105 | 2. We use [this Docker image](https://github.com/Percona-Lab/percona-doc-docker) to build documentation. Run the following command: 106 | 107 | ```sh 108 | docker run --rm -v $(pwd):/docs perconalab/pmm-doc-md mkdocs build 109 | ``` 110 | If Docker can't find the image locally, it first downloads the image, and then runs it to build the documentation. 111 | 112 | 3. Go to the ``site`` directory and open the ``index.html`` file to see the documentation. 113 | 4. To view your changes as you make them, run the following command: 114 | 115 | ``` sh 116 | docker run --rm -p 8000:8000 -v $(pwd):/docs perconalab/pmm-doc-md mkdocs serve -a 0.0.0.0:8000 117 | ``` 118 | 119 | 5. To create a PDF version of the documentation, run the following command: 120 | 121 | ```sh 122 | docker run --rm -v $(pwd):/docs -e ENABLE_PDF_EXPORT=1 perconalab/pmm-doc-md mkdocs build -f mkdocs-pdf.yml 123 | ``` 124 | 125 | The PDF document is in the ``site/pdf`` folder. 126 | 127 | #### Install MkDocs and build locally 128 | 129 | 1. Install [pip](https://pip.pypa.io/en/stable/installing/) 130 | 2. Install [MkDocs](https://www.mkdocs.org/getting-started/#installation). 131 | 3. Install all the required dependencies: 132 | 133 | ``` 134 | pip install -r requirements.txt 135 | ``` 136 | 137 | 3. While in the root directory of the doc project, run the following command to build the documentation: 138 | 139 | ```sh 140 | mkdocs build 141 | ``` 142 | 4. Go to the ``site`` directory and open the ``index.html`` file in your web browser to see the documentation. 143 | 5. To automatically rebuild the documentation and reload the browser as you make changes, run the following command: 144 | 145 | ```sh 146 | mkdocs serve 147 | ``` 148 | 149 | 6. To build the PDF documentation, do the following: 150 | - Install [mkdocs-print-site-plugin](https://timvink.github.io/mkdocs-print-site-plugin/index.html) 151 | - Run the following command 152 | 153 | ```sh 154 | mkdocs build 155 | ``` 156 | 157 | This creates a single HTML page for the whole doc project. You can find the page at `site/print_page.html`. 158 | 159 | 7. Open the `site/print_page.html` in your browser and save as PDF. Depending on the browser, you may need to select the Export to PDF, Print - Save as PDF or just Save and select PDF as the output format. 160 | 161 | ## Repository structure 162 | 163 | The repository includes the following directories and files: 164 | 165 | - `mkdocs-base.yml` - the base configuration file. It includes general settings and documentation structure. 166 | - `mkdocs.yml` - configuration file. Contains the settings for building the docs on Percona website 167 | - `mkdocs-pdf.yml` - configuration file. Contains the settings for building the PDF docs. 168 | - `docs`: 169 | - `*.md` - Source markdown files. 170 | - `_images` - Images, logos and favicons 171 | - `css` - Styles 172 | - `js` - Javascript files 173 | - `templates`: 174 | - `pdf_cover_page.tpl` - The PDF cover page template 175 | - `_resourcepdf`: 176 | - `overrides` - The directory with customized layout templates for PDF 177 | - `.github`: 178 | - `workflows`: 179 | - `main.yml` - The workflow configuration for building documentation with a GitHub action. (The documentation is built with `mike` tool to a dedicated `publish` branch) 180 | - `snippets` - The folder with pieces of documentation used in multiple places 181 | - `site` - This is where the output HTML files are put after the build 182 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Portions Copyright (c) 2021 Percona LLC and/or its affiliates 2 | 3 | Portions Copyright (c) 1996-2021, The PostgreSQL Global Development Group 4 | 5 | This work is licensed under [the PostgreSQL License] 6 | (http://www.postgresql.org/about/licence/) 7 | 8 | Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. 9 | 10 | IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11 | 12 | THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Percona Distribution for PostgreSQL documentation. 2 | 3 | Welcome to Percona Distribution for PostgreSQL documentation! 4 | 5 | ## Overview 6 | 7 | Percona Distribution for PostgreSQL is a collection of tools to assist you in managing your PostgreSQL database system. It includes Percona Server for PostgreSQL and a selection of extensions that enable solving essential practical tasks efficiently. 8 | 9 | Percona Server for PostgreSQL is an open source binary-compatible drop-in replacement for PostgreSQL Community. Percona Server for PostgreSQL introduces additional features to the upstream server, including: 10 | 11 | * Storage Manager (SMGR) API Exposure: Allows PostgreSQL extensions to integrate custom storage managers. This change was inspired by the [patchset](https://www.postgresql.org/message-id/flat/CAJ7c6TOqqrzjYsU6LgDkcJ0yVgzdkx2juJjgAjzP2jPOpZ1qUA%40mail.gmail.com#8e68cfc57fcac14c8e24b00b41e61baf) introduced to the community. 12 | * WAL Read/Write API Exposure to hook into WAL read and write functions. 13 | 14 | Percona Server and upstream PostgreSQL function identically enabling you to migrate from one to another. 15 | 16 | This repository contains the source files for [Percona Distribution for PostgreSQL documentation](https://www.percona.com/doc/postgresql/17/index.html). The documentation is written in [Markdown](https://www.markdownguide.org/) markup language and is created using [MkDocs Documentation Generator](https://www.mkdocs.org/). 17 | 18 | ## Contributing 19 | 20 | We welcome all contributions and are always looking for new members that are as dedicated to serving the community as we are. You can reach out to us using our [forums ](https://forums.percona.com/c/postgresql/25) and [Jira issue tracker ](https://jira.percona.com/projects/DISTPG/issues/DISTPG-16?filter=allopenissues). 21 | 22 | For how to contribute to documentation, read the [Contributing guide ](https://github.com/percona/postgresql-docs/blob/17/CONTRIBUTING.md). 23 | 24 | ## License 25 | 26 | Percona Distribution for PostgreSQL documentation is licensed under the [PostgreSQL license ](https://opensource.org/licenses/postgresql). -------------------------------------------------------------------------------- /_resource/.icons/edit_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/_resource/.icons/edit_page.png -------------------------------------------------------------------------------- /_resource/.icons/file-document-edit-outline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_resource/.icons/percona/logo-postgresql.svg: -------------------------------------------------------------------------------- 1 | 2 | 12 | 14 | 32 | 36 | 37 | -------------------------------------------------------------------------------- /_resource/.icons/percona/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /_resource/overrides/404.html: -------------------------------------------------------------------------------- 1 | {#- 2 | This file was automatically generated - do not edit 3 | -#} 4 | {% extends "main.html" %} 5 | {% block content %} 6 |

404 - Not found

7 |

8 | We can't find the page you are looking for. Try using the Search or return to homepage .

9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /_resource/overrides/main.html: -------------------------------------------------------------------------------- 1 | {# 2 | MkDocs template for builds with Material theme to customize docs layout 3 | by adding marketing-requested elements 4 | #} 5 | 6 | {# Import the theme's layout. #} 7 | {% extends "base.html" %} 8 | 9 | 10 | {% block scripts %} 11 | 12 | {{ super() }} 13 | {% endblock %} 14 | 15 | {% block extrahead %} 16 | {{ super() }} 17 | {% set title = config.site_name %} 18 | {% if page and page.meta and page.meta.title %} 19 | {% set title = title ~ " - " ~ page.meta.title %} 20 | {% elif page and page.title and not page.is_homepage %} 21 | {% set title = title ~ " - " ~ page.title %} 22 | {% endif %} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | {% endblock %} 32 | 33 | 34 | {% block site_nav %} 35 | {% if nav %} 36 | {% if page.meta and page.meta.hide %} 37 | {% set hidden = "hidden" if "navigation" in page.meta.hide %} 38 | {% endif %} 39 | 52 | {% endif %} 53 | {% if "toc.integrate" not in features %} 54 | {% if page.meta and page.meta.hide %} 55 | {% set hidden = "hidden" if "toc" in page.meta.hide %} 56 | {% endif %} 57 | 67 | {% endif %} 68 | {% endblock %} 69 | 70 | {% block content%} 71 | 72 | {{ super() }} 73 | 74 | 78 | 79 | {% endblock %} -------------------------------------------------------------------------------- /_resource/overrides/partials/banner.html: -------------------------------------------------------------------------------- 1 |
2 |

3 |

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

4 | 5 |
6 | 7 | Get help from Percona 8 |
9 |
-------------------------------------------------------------------------------- /_resource/overrides/partials/copyright.html: -------------------------------------------------------------------------------- 1 | {#- 2 | This file was automatically generated - do not edit 3 | -#} 4 | -------------------------------------------------------------------------------- /_resource/overrides/partials/header.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | {% set class = "md-header" %} 25 | {% if "navigation.tabs.sticky" in features %} 26 | {% set class = class ~ " md-header--shadow md-header--lifted" %} 27 | {% elif "navigation.tabs" not in features %} 28 | {% set class = class ~ " md-header--shadow" %} 29 | {% endif %} 30 | 31 | 32 |
33 | 34 | 35 | 50 | 51 | 128 | 129 | 130 | {% if "navigation.tabs.sticky" in features %} 131 | {% if "navigation.tabs" in features %} 132 | {% include "partials/tabs.html" %} 133 | {% endif %} 134 | {% endif %} 135 |
-------------------------------------------------------------------------------- /_resource/templates/styles.scss: -------------------------------------------------------------------------------- 1 | /* Style for PDF created by MkDocs with mkdocs-with-pdf plugin (https://pypi.org/project/mkdocs-with-pdf/) */ 2 | @media print { 3 | html { 4 | font-size: 100%; 5 | font-family: "Poppins", sans-serif; 6 | } 7 | 8 | body { 9 | font-family: "Poppins", sans-serif; 10 | color: #00162b; 11 | } 12 | 13 | article { 14 | font-family: "Poppins", sans-serif; 15 | text-align: justify; 16 | } 17 | 18 | pre, 19 | code, 20 | var, 21 | samp, 22 | kbd, 23 | tt { 24 | font-family: monospace; 25 | font-size: 110%; 26 | } 27 | 28 | pre code, 29 | pre var, 30 | pre samp, 31 | pre kbd, 32 | pre tt { 33 | font-size: 110%; 34 | } 35 | } 36 | 37 | @page { 38 | size: a4 portrait; 39 | margin: 25mm 20mm 25mm 20mm; 40 | counter-increment: page; 41 | white-space: pre; 42 | color: #00162b; 43 | 44 | @top-right { 45 | content: string(chapter); 46 | } 47 | 48 | @bottom-left { 49 | content: string(subtitle); 50 | } 51 | 52 | @bottom-center { 53 | content: counter(page)' of 'counter(pages); 54 | } 55 | 56 | @bottom-right { 57 | } 58 | } 59 | 60 | @page :first { 61 | @top-right { 62 | content: ''; 63 | } 64 | 65 | @bottom-right { 66 | content: ''; 67 | } 68 | 69 | @bottom-left { 70 | content: ''; 71 | } 72 | } 73 | 74 | article { 75 | page-break-before: always; 76 | min-height: 100%; 77 | } 78 | 79 | article { 80 | 81 | h1, 82 | h2, 83 | h3 { 84 | border-bottom: 0px solid #fff; 85 | } 86 | 87 | h1>.pdf-order, 88 | h2>.pdf-order, 89 | h3>.pdf-order { 90 | padding-left: 6px; 91 | padding-right: 0.8rem; 92 | } 93 | } 94 | 95 | article h1, 96 | h2, 97 | h3 { 98 | border-bottom: 0px solid #fff; 99 | color: #3e4875; 100 | } 101 | 102 | .admonition { 103 | font-size: 100%; 104 | } 105 | 106 | .md-typeset .admonition.note, 107 | .md-typeset details.note { 108 | color: #00162b; 109 | border-color: #fff; 110 | } -------------------------------------------------------------------------------- /_resource/theme/main.html: -------------------------------------------------------------------------------- 1 | {# 2 | MkDocs template for PMM 3 | Builds HTML without outer html tags 4 | for wrapping within Drupal container 5 | #} 6 | {%- set url_root = config.site_url %} 7 | {%- set site_name = config.site_name %} 8 | {%- set page_title = page.title %} 9 | {%- set release = config.extra.release %} 10 | 11 | {# toctree() section level start and limit #} 12 | {% set default_level = 1 %} 13 | {% set max_level = 4 %} 14 | 15 | {#### Horizontal navigation bars above and below main content (Home, prev, next) #} 16 | {%- macro relbar() %} 17 | 34 | {% endmacro %} 35 | 36 | {#### 'Edit this page' and 'Report issue' links #} 37 | {% macro edit_report() %} 38 | {% if page and page.edit_url %} 39 | 52 | {% endif %} 53 | {% endmacro %} 54 | 55 | {#### 'Last updated' (and later, other info such as author, tester) #} 56 | {% macro last_updated() %} 57 |
58 |
    59 | {% if page and page.meta.revision_date %} 60 |
  • 61 | {{ config.extra.updated_text }} {{ page.meta.revision_date }} 62 |
  • 63 | {% endif %} 64 |
65 |
66 | {% endmacro %} 67 | 68 | {#### Contents of left column navigation bar #} 69 | {% macro sidebar() %} 70 |
71 |
72 | {@ product_logo @} 73 | {@ product_pdf_download @} 74 | {{ version_menu() }} 75 |

Table Of Contents

76 | {{ toctree(nav, default_level) }} 77 | {{ relations() }} 78 | {@ product_series @} 79 |
80 |
81 | {% endmacro %} 82 | 83 | {### Left nav column previous/next links #} 84 | {% macro relations() %} 85 | {% if page.previous_page %} 86 |

Previous page

87 |

88 | {{ page.previous_page.title|e }} 89 |

90 | {% endif %} 91 | {% if page.next_page %} 92 |

Next page

93 |

94 | {{ page.next_page.title|e }} 95 |

96 | {% endif %} 97 | {% endmacro %} 98 | 99 | 100 | {# 101 | Used by toctree() 102 | 103 | MkDocs doesn't allow a section link. Example, in mkdocs.yaml: 104 | 105 | nav: 106 | - SECTION TITLE: 107 | - intro: dir/index.md 108 | - another: dir/section.md 109 | 110 | The toctree will render without a link for 'SECTION TITLE', 111 | as it doesn't have a file. 'SECTION TITLE' is just a cosmetic 112 | label. 113 | 114 | To match Sphinx's behaviour, this macro detects special 115 | section labels as 'TITLE=path' (splitting on the equals sign). 116 | The new nav element would then be: 117 | 118 | nav: 119 | - SECTION TITLE=/dir/: 120 | - intro: dir/index.md 121 | - another: dir/section.md 122 | 123 | This macro will put a link to /dir/ for the toc entry 124 | 'SECTION TITLE'. If there is not an index.md file in 125 | the subdir, link to a file with its .html extension. 126 | 127 | nav: 128 | - SECTION TITLE=/dir/myindex.html: 129 | - intro: dir/index.md 130 | - another: dir/section.md 131 | 132 | #} 133 | {%- macro navi(item, class, close) %} 134 |
  • 135 | {%- if item.url %} 136 | {{ item.title }} 137 | {%- else %} 138 | {{ item.title }} 139 | {% endif %} 140 | 141 | {%- if close %} 142 |
  • 143 | {% endif %} 144 | {% endmacro %} 145 | 146 | {# Table of contents for left nav column #} 147 | {% macro toctree(n, level) %} 148 | {% if level <= max_level %} 149 |
      150 | {% for i in n %} 151 | {{ navi(i, "toctree-l" + level|string) }} 152 | {% if i.children %} 153 | {{ toctree(i.children, level+1) }} 154 | {% endif %} 155 | {% endfor %} 156 |
    157 | {% endif %} 158 | {% endmacro %} 159 | 160 | {# Inserts script items from mkdocs.yml #} 161 | {%- macro script() %} 162 | {%- for scriptfile in config.extra_javascript %} 163 | 164 | {% endfor %} 165 | {% endmacro %} 166 | 167 | {# Inserts CSS files from mkdocs.yml #} 168 | {%- macro css() %} 169 | {%- for cssfile in config.extra_css %} 170 | 171 | {%- endfor %} 172 | {% endmacro %} 173 | 174 | {%- macro metatags() %} 175 | {# TODO #} 176 | {% endmacro %} 177 | 178 | {% macro version_menu() %} 179 |
    180 | 181 |
    182 | {% endmacro %} 183 | 184 | {# Layout for content as hosted by Drupal (no outer html tag) #} 185 | {# NOTE: title and head are ignored by Drupal's container #} 186 | {{ site_name|e }}{% if page_title %} — {{ page_title|striptags|e }}{% endif %} 187 | 188 | 189 | {{ metatags() }} 190 | {{ script() }} 191 | 192 | {% if page.next_page %} 193 | 194 | {% endif %} 195 | {% if page.previous %} 196 | 197 | {% endif %} 198 | 199 | 200 | 201 | {{ css() }} 202 | {{ script() }} 203 |
    204 |
    205 |
    206 | {{ relbar() }} 207 | {{ edit_report() }} 208 |
    209 |
    210 | {{ page.content }} 211 |
    212 |
    213 | {{ last_updated() }} 214 | {{ relbar() }} 215 |
    216 | {{ sidebar() }} 217 |
    218 |
    219 |
    220 | 221 | -------------------------------------------------------------------------------- /_resourcepdf/overrides/404.html: -------------------------------------------------------------------------------- 1 | {#- 2 | This file was automatically generated - do not edit 3 | -#} 4 | {% extends "main.html" %} 5 | {% block content %} 6 |

    404 - Not found

    7 |

    8 | We can't find the page you are looking for. Try using the Search or return to homepage .

    9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /_resourcepdf/overrides/main.html: -------------------------------------------------------------------------------- 1 | {# 2 | MkDocs template for builds with Material theme to customize docs layout 3 | by adding marketing-requested elements 4 | #} 5 | 6 | {# Import the theme's layout. #} 7 | {% extends "base.html" %} 8 | 9 | 10 | {% block site_nav %} 11 | {% if nav %} 12 | {% if page.meta and page.meta.hide %} 13 | {% set hidden = "hidden" if "navigation" in page.meta.hide %} 14 | {% endif %} 15 | 28 | {% endif %} 29 | {% if "toc.integrate" not in features %} 30 | {% if page.meta and page.meta.hide %} 31 | {% set hidden = "hidden" if "toc" in page.meta.hide %} 32 | {% endif %} 33 | 43 | {% endif %} 44 | {% endblock %} 45 | 46 | {% block content%} 47 | 48 | {{ super() }} 49 | 50 | 51 | 69 | {% endblock %} -------------------------------------------------------------------------------- /_resourcepdf/overrides/partials/banner.html: -------------------------------------------------------------------------------- 1 |
    2 |

    3 |

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

    4 | 5 |
    6 | 7 | Get help from Percona 8 |
    9 |
    -------------------------------------------------------------------------------- /_resourcepdf/overrides/partials/copyright.html: -------------------------------------------------------------------------------- 1 | {#- 2 | This file was automatically generated - do not edit 3 | -#} 4 | -------------------------------------------------------------------------------- /_resourcepdf/overrides/partials/header.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | {% set class = "md-header" %} 25 | {% if "navigation.tabs.sticky" in features %} 26 | {% set class = class ~ " md-header--shadow md-header--lifted" %} 27 | {% elif "navigation.tabs" not in features %} 28 | {% set class = class ~ " md-header--shadow" %} 29 | {% endif %} 30 | 31 | 32 |
    33 | 34 | 35 | 50 | 51 | 128 | 129 | 130 | {% if "navigation.tabs.sticky" in features %} 131 | {% if "navigation.tabs" in features %} 132 | {% include "partials/tabs.html" %} 133 | {% endif %} 134 | {% endif %} 135 |
    -------------------------------------------------------------------------------- /docs/_images/PPG_links.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/_images/PPG_links.png -------------------------------------------------------------------------------- /docs/_images/Percona_Logo_Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/_images/Percona_Logo_Color.png -------------------------------------------------------------------------------- /docs/_images/diagrams/DR-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/_images/diagrams/DR-architecture.png -------------------------------------------------------------------------------- /docs/_images/diagrams/Spatial-data-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/_images/diagrams/Spatial-data-arch.png -------------------------------------------------------------------------------- /docs/_images/diagrams/ha-architecture-patroni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/_images/diagrams/ha-architecture-patroni.png -------------------------------------------------------------------------------- /docs/_images/diagrams/patroni-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/_images/diagrams/patroni-architecture.png -------------------------------------------------------------------------------- /docs/_images/postgresql-fav.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/_images/postgresql-mark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/_images/postgresql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/_images/postgresql.png -------------------------------------------------------------------------------- /docs/apt.md: -------------------------------------------------------------------------------- 1 | # Install Percona Distribution for PostgreSQL on Debian and Ubuntu 2 | 3 | This document describes how to install Percona Server for PostgreSQL from Percona repositories on DEB-based distributions such as Debian and Ubuntu. [Read more about Percona repositories](repo-overview.md). 4 | 5 | ## Preconditions 6 | 7 | 1. Debian and other systems that use the `apt` package manager include the upstream PostgreSQL server package `postgresql-{{pgversion}}` by default. The components of Percona Distribution for PostgreSQL {{pgversion}} can only be installed together with Percona Server for PostgreSQL (`percona-postgresql-{{pgversion}}`). If you wish to use Percona Distribution for PostgreSQL, uninstall the `postgresql-{{pgversion}}` package provided by your distribution and then install the chosen components from Percona Distribution for PostgreSQL. 8 | 2. Install `curl` for [Telemetry](telemetry.md). We use it to better understand the use of our products and improve them. To install `curl`, run the following command: 9 | 10 | ```{.bash data-prompt="$"} 11 | $ sudo apt install curl 12 | ``` 13 | 14 | 15 | ## Procedure 16 | 17 | Run all the commands in the following sections as root or using the `sudo` command: 18 | 19 | ### Configure Percona repository {.power-number} 20 | 21 | 1. Install the `percona-release` repository management tool to subscribe to Percona repositories: 22 | 23 | * Fetch `percona-release` packages from Percona web: 24 | 25 | ```{.bash data-prompt="$"} 26 | $ wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb 27 | ``` 28 | 29 | * Install the downloaded package with `dpkg`: 30 | 31 | ```{.bash data-prompt="$"} 32 | $ sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb 33 | ``` 34 | 35 | * Refresh the local cache: 36 | 37 | ```{.bash data-prompt="$"} 38 | $ sudo apt update 39 | ``` 40 | 41 | 2. Enable the repository 42 | 43 | Percona provides [two repositories](repo-overview.md) for Percona Distribution for PostgreSQL. We recommend enabling the Major release repository to timely receive the latest updates. 44 | 45 | ```{.bash data-prompt="$"} 46 | $ sudo percona-release setup ppg-{{pgversion}} 47 | ``` 48 | 49 | ### Install packages 50 | 51 | === "Install using meta-package (deprecated)" 52 | 53 | The [meta package](repo-overview.md#percona-ppg-server){:target=”_blank”} enables you to install several components of the distribution in one go. 54 | 55 | ```{.bash data-prompt="$"} 56 | $ sudo apt install percona-ppg-server-{{pgversion}} 57 | ``` 58 | 59 | === "Install packages individually" 60 | 61 | Run the following commands: 62 | {.power-number} 63 | 64 | 1. Install the PostgreSQL server package: 65 | 66 | ```{.bash data-prompt="$"} 67 | $ sudo apt install percona-postgresql-{{pgversion}} 68 | ``` 69 | 70 | 2. Install the components: 71 | 72 | Install `pg_repack`: 73 | 74 | ```{.bash data-prompt="$"} 75 | $ sudo apt install percona-postgresql-{{pgversion}}-repack 76 | ``` 77 | 78 | Install `pgAudit`: 79 | 80 | ```{.bash data-prompt="$"} 81 | $ sudo apt install percona-postgresql-{{pgversion}}-pgaudit 82 | ``` 83 | 84 | Install `pgBackRest`: 85 | 86 | ```{.bash data-prompt="$"} 87 | $ sudo apt install percona-pgbackrest 88 | ``` 89 | 90 | Install `Patroni`: 91 | 92 | ```{.bash data-prompt="$"} 93 | $ sudo apt install percona-patroni 94 | ``` 95 | 96 | [Install `pg_stat_monitor` :octicons-link-external-16:](https://docs.percona.com/pg-stat-monitor/install.html#__tabbed_1_1) 97 | 98 | 99 | Install `pgBouncer`: 100 | 101 | ```{.bash data-prompt="$"} 102 | $ sudo apt install percona-pgbouncer 103 | ``` 104 | 105 | Install `pgAudit-set_user`: 106 | 107 | ```{.bash data-prompt="$"} 108 | $ sudo apt install percona-pgaudit{{pgversion}}-set-user 109 | ``` 110 | 111 | Install `pgBadger`: 112 | 113 | ```{.bash data-prompt="$"} 114 | $ sudo apt install percona-pgbadger 115 | ``` 116 | 117 | Install `wal2json`: 118 | 119 | ```{.bash data-prompt="$"} 120 | $ sudo apt install percona-postgresql-{{pgversion}}-wal2json 121 | ``` 122 | 123 | Install PostgreSQL contrib extensions: 124 | 125 | ```{.bash data-prompt="$"} 126 | $ sudo apt install percona-postgresql-contrib 127 | ``` 128 | 129 | Install HAProxy 130 | 131 | ```{.bash data-prompt="$"} 132 | $ sudo apt install percona-haproxy 133 | ``` 134 | 135 | Install pgpool2 136 | 137 | ```{.bash data-prompt="$"} 138 | $ sudo apt install percona-pgpool2 139 | ``` 140 | 141 | Install `pg_gather` 142 | 143 | ```{.bash data-prompt="$"} 144 | $ sudo apt install percona-pg-gather 145 | ``` 146 | 147 | Install `pgvector` 148 | 149 | ```{.bash data-prompt="$"} 150 | $ sudo apt install percona-postgresql-{{pgversion}}-pgvector 151 | ``` 152 | 153 | Some extensions require additional setup in order to use them with Percona Distribution for PostgreSQL. For more information, refer to [Enabling extensions](enable-extensions.md). 154 | 155 | ### Start the service 156 | 157 | The installation process automatically initializes and starts the default database. You can check the database status using the following command: 158 | 159 | ```{.bash data-prompt="$"} 160 | $ sudo systemctl status postgresql.service 161 | ``` 162 | 163 | Check the Percona Distribution for PostgreSQL version: 164 | 165 | ```{.bash data-prompt="$"} 166 | $ psql --version 167 | ``` 168 | 169 | ??? example "Sample output" 170 | 171 | ```{.text .no-copy} 172 | psql (PostgreSQL) {{pspgversion}} (Percona Server for PostgreSQL) {{pspgversion}} 173 | ``` 174 | 175 | Congratulations! Your Percona Distribution for PostgreSQL is up and running. 176 | 177 | ## Next steps 178 | 179 | [Enable extensions :material-arrow-right:](enable-extensions.md){.md-button} 180 | 181 | [Connect to PostgreSQL :material-arrow-right:](connect.md){.md-button} 182 | -------------------------------------------------------------------------------- /docs/connect.md: -------------------------------------------------------------------------------- 1 | # Connect to the PostgreSQL server 2 | 3 | With PostgreSQL server up and running, let's connect to it. 4 | 5 | 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. 6 | {.power-number} 7 | 8 | 1. Switch to the `postgres` user. 9 | 10 | ```{.bash data-prompt="$"} 11 | $ sudo su postgres 12 | ``` 13 | 14 | 2. Open the PostgreSQL interactive terminal `psql`: 15 | 16 | ```{.bash data-prompt="$"} 17 | $ psql 18 | ``` 19 | 20 | :material-information: Hint: You can connect to `psql` as the `postgres` user in one go: 21 | 22 | ```{.bash data-prompt="$"} 23 | $ sudo su - postgres -c psql 24 | ``` 25 | 26 | 27 | ## Basic `psql` commands 28 | 29 | While connected to PostgreSQL, let's practice some basic `psql` commands to interact with the database: 30 | 31 | 1. List databases: 32 | 33 | ```{.bash data-prompt="$"} 34 | $ \l 35 | ``` 36 | 37 | 2. Display tables in the current database: 38 | 39 | ```{.bash data-prompt="$"} 40 | $ \dt 41 | ``` 42 | 43 | 3. Display columns in a table 44 | 45 | ```{.bash data-prompt="$"} 46 | $ \d 47 | ``` 48 | 49 | 4. Switch databases 50 | 51 | ```{.bash data-prompt="$"} 52 | $ \c 53 | ``` 54 | 55 | 5. Display users and roles 56 | 57 | ```{.bash data-prompt="$"} 58 | $ \du 59 | ``` 60 | 61 | 6. Exit the `psql` terminal: 62 | 63 | ```{.bash data-prompt="$"} 64 | $ \q 65 | ``` 66 | 67 | To learn more about using `psql`, see [`psql` :octicons-link-external-16:](https://www.postgresql.org/docs/current/app-psql.html) documentation. 68 | 69 | Congratulations! You have connected to PostgreSQL and learned some essential `psql` commands. 70 | 71 | ## Next steps 72 | 73 | [Manipulate data in PostgreSQL :material-arrow-right:](crud.md){.md-button} -------------------------------------------------------------------------------- /docs/crud.md: -------------------------------------------------------------------------------- 1 | # Manipulate data in PostgreSQL 2 | 3 | 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. 4 | 5 | ## Create a database 6 | 7 | Let's create the database `test`. Use the CREATE DATABASE command: 8 | 9 | ```sql 10 | CREATE DATABASE test; 11 | ``` 12 | 13 | ## Create a table 14 | 15 | Let's create a sample table `Customers` in the `test` database using the following command: 16 | 17 | ```sql 18 | CREATE TABLE customers ( 19 | id SERIAL PRIMARY KEY, -- 'id' is an auto-incrementing integer 20 | first_name VARCHAR(50), -- 'first_name' is a string with a maximum length of 50 characters 21 | last_name VARCHAR(50), -- 'last_name' is a string with a maximum length of 50 characters 22 | email VARCHAR(100) -- 'email' is a string with a maximum length of 100 characters 23 | ); 24 | ``` 25 | 26 | :material-information: Hint:Having issues with table creation? Check our [Troubleshooting guide](troubleshooting.md) 27 | 28 | ## Insert the data 29 | 30 | Populate the table with the sample data as follows: 31 | 32 | ```sql 33 | INSERT INTO customers (first_name, last_name, email) 34 | VALUES 35 | ('John', 'Doe', 'john.doe@example.com'), -- Insert a new row 36 | ('Jane', 'Doe', 'jane.doe@example.com'), -- Insert another new row 37 | ('Alice', 'Smith', 'alice.smith@example.com'); 38 | ``` 39 | 40 | ## Query data 41 | 42 | Let's verify the data insertion by querying it: 43 | 44 | ```sql 45 | SELECT * FROM customers; 46 | ``` 47 | 48 | ??? example "Expected output" 49 | 50 | ```{.sql .no-copy} 51 | id | first_name | last_name | email 52 | ----+------------+-----------+------------------------- 53 | 1 | John | Doe | john.doe@example.com 54 | 2 | Jane | Doe | jane.doe@example.com 55 | 3 | Alice | Smith | alice.smith@example.com 56 | (3 rows) 57 | ``` 58 | 59 | ## Update data 60 | 61 | Let's update John Doe's record with a new email address. 62 | 63 | 1. Use the UPDATE command for that: 64 | 65 | ```sql 66 | UPDATE customers 67 | SET email = 'john.doe@myemail.com' 68 | WHERE first_name = 'John' AND last_name = 'Doe'; 69 | ``` 70 | 71 | 2. Query the table to verify the updated data: 72 | 73 | ```sql 74 | SELECT * FROM customers WHERE first_name = 'John' AND last_name = 'Doe'; 75 | ``` 76 | 77 | ??? example "Expected output" 78 | 79 | ```{.sql .no-copy} 80 | id | first_name | last_name | email 81 | ----+------------+-----------+------------------------- 82 | 2 | Jane | Doe | jane.doe@example.com 83 | 3 | Alice | Smith | alice.smith@example.com 84 | 1 | John | Doe | john.doe@myemail.com 85 | (3 rows) 86 | ``` 87 | 88 | ## Delete data 89 | 90 | Use the DELETE command to delete rows. For example, delete the record of Alice Smith: 91 | 92 | ```sql 93 | DELETE FROM Customers WHERE first_name = 'Alice' AND last_name = 'Smith'; 94 | ``` 95 | 96 | If you wish to delete the whole table, use the `DROP TABLE` command instead as follows: 97 | 98 | ```sql 99 | DROP TABLE customers; 100 | ``` 101 | 102 | To delete the whole database, use the DROP DATABASE command: 103 | 104 | ```sql 105 | DROP DATABASE test; 106 | ``` 107 | 108 | 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. 109 | 110 | ## Next steps 111 | 112 | [What's next?](whats-next.md){.md-button} 113 | -------------------------------------------------------------------------------- /docs/css/extra.css: -------------------------------------------------------------------------------- 1 | @media print { 2 | /* Adjusts positioning of admonition icon */ 3 | .md-typeset :is(.admonition-title,summary):before { 4 | top: 0.6rem; 5 | left: 0.6rem; 6 | } 7 | } 8 | 9 | .md-sidebar__inner { 10 | font-size: 0.65rem; /* Font size */ 11 | line-height: 1.6; 12 | } -------------------------------------------------------------------------------- /docs/css/landing.css: -------------------------------------------------------------------------------- 1 | 2 | /* Type */ 3 | 4 | .landing h1, 5 | .landing h2 { 6 | font-size: calc(1.5em + 1vw); 7 | line-height: 1.125; 8 | text-transform: uppercase; 9 | letter-spacing: 0; 10 | margin: 0.5em 0; 11 | } 12 | 13 | /* Layout adjustments */ 14 | 15 | .md-header, .md-tabs { 16 | background-color: var(--stone800); 17 | } 18 | .landing > :not(:last-child) { 19 | margin-bottom: 2em; 20 | } 21 | /* .md-content__inner { 22 | display: flex; 23 | flex-direction: column; 24 | } 25 | .md-content__inner > :not(.landing) { 26 | width: 100%; 27 | max-width: calc(34.3rem); 28 | max-width: calc(34.3rem + 1.2rem + 12.1rem); 29 | align-self: center; 30 | } */ 31 | [data-grid] [data-banner] { 32 | flex: 0 1 calc(50% - 1rem); 33 | } 34 | 35 | /* Splash Box */ 36 | 37 | .splash { 38 | display: flex; 39 | position: relative; 40 | justify-content: space-between; 41 | line-height: 1.25; 42 | padding: calc(0.5em + 3%); 43 | border: 1px solid var(--md-default-fg-color--lightest); 44 | border-radius: calc(0.5rem + 0.75vw); 45 | background: linear-gradient(110deg, var(--md-default-bg-color) 33%, var(--md-footer-bg-color--dark) 95%); 46 | overflow: hidden; 47 | background-repeat: no-repeat; 48 | } 49 | .splash.dark { 50 | color: var(--white); 51 | --md-primary-fg-color: var(--stone50); 52 | --md-accent-fg-color: var(--white); 53 | } 54 | .splash.highlight { 55 | background: 56 | linear-gradient( 57 | 110deg, 58 | rgba(44,50,62,0.9) 10%, 59 | rgba(44,50,62,0.1) 90% 60 | ), 61 | url(../assets/highlight.jpg) center / cover var(--stone800); 62 | border: none; 63 | background-repeat: no-repeat; 64 | } 65 | .splash.mysql { 66 | background: 67 | linear-gradient( 68 | 110deg, 69 | rgba(0,0,0,0.2) 33%, 70 | rgba(0,0,0,0.1) 95% 71 | ), 72 | linear-gradient( 73 | 110deg, 74 | rgb(14,95,181) 33%, 75 | rgb(48,209,178) 95% 76 | ); 77 | } 78 | .splash.postgresql { 79 | background: 80 | linear-gradient( 81 | 110deg, 82 | rgba(0,0,0,0.4) 33%, 83 | rgba(0,0,0,0.1) 95% 84 | ), 85 | linear-gradient( 86 | 110deg, 87 | rgb(78,91,150) 33%, 88 | rgb(67,158,255) 95% 89 | ); 90 | } 91 | .splash.mongodb { 92 | background: 93 | linear-gradient( 94 | 110deg, 95 | rgba(0,0,0,0.4) 33%, 96 | rgba(0,0,0,0.1) 95% 97 | ), 98 | linear-gradient( 99 | 110deg, 100 | rgb(24,109,73) 33%, 101 | rgb(48,209,190) 95% 102 | ); 103 | } 104 | .splash.operators { 105 | background: 106 | linear-gradient( 107 | 110deg, 108 | transparent 33%, 109 | rgba(0,0,0,0.1) 95% 110 | ), 111 | linear-gradient( 112 | 110deg, 113 | rgb(11,39,140) 33%, 114 | rgb(20,142,255) 95% 115 | ); 116 | } 117 | .splash.header { 118 | flex-direction: column; 119 | align-items: flex-start; 120 | border: none; 121 | background-repeat: no-repeat; 122 | } 123 | 124 | /* Splash Contents */ 125 | 126 | .splash > * { 127 | flex: 0 1 45%; 128 | } 129 | .splash h1, 130 | .splash h2 { 131 | margin-top: 0; 132 | margin-bottom: -0.125em; 133 | } 134 | .splash > :last-child { 135 | margin-bottom: 0; 136 | } 137 | .splash-intro { 138 | margin: 0.5rem 0.75rem; 139 | } 140 | .splash-links > :not(:last-child) { 141 | margin-bottom: 1em; 142 | } 143 | .splash.dark .md-button { 144 | border-color: rgba(255, 255, 255, 0.4) 145 | } 146 | .splash.dark .md-button:hover { 147 | border-color: var(--white) 148 | } 149 | .splash.dark .md-button--primary, 150 | .splash.dark .md-button--primary:hover { 151 | color: var(--stone700); 152 | } 153 | .splash.dark .md-button--primary:hover { 154 | color: var(--stone900); 155 | } 156 | .splash.header > * { 157 | max-width: 30rem; 158 | z-index: 1; 159 | } 160 | .splash.header > :first-child { 161 | margin: 0; 162 | } 163 | .splash.header img { 164 | display: block; 165 | position: absolute; 166 | top: 50%; 167 | right: 1rem; 168 | width: 12rem; 169 | height: 12rem; 170 | margin: 0; 171 | transform: translateY(-50%); 172 | z-index: 0; 173 | } 174 | 175 | /* Splash Card */ 176 | 177 | a.splash-card { 178 | display: flex; 179 | flex-direction: column; 180 | justify-content: center; 181 | min-height: 6.75em; 182 | padding: 0.75rem 0.375rem 0.5rem 4.75rem; 183 | border: 1px solid var(--md-default-fg-color--lightest); 184 | border-radius: calc(0.25rem + 0.375vw); 185 | cursor: pointer; 186 | text-decoration: none !important; 187 | color: var(--md-typeset-color); 188 | position: relative; 189 | background-color: var(--md-default-bg-color); 190 | transition: all 0.2s ease-out; 191 | } 192 | .splash.highlight a.splash-card { 193 | color: var(--white); 194 | background-color: rgba(255, 255, 255, 0.2); 195 | backdrop-filter: blur(0.75rem); 196 | border-color: rgba(255,255,255,0.1); 197 | } 198 | a.splash-card:hover { 199 | box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.12), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 2px 4px -1px rgba(0, 0, 0, 0.20); 200 | color: var(--md-typeset-color); 201 | } 202 | .splash.highlight a.splash-card:hover { 203 | background-color: rgba(255, 255, 255, 0.4); 204 | border-color: rgba(255,255,255,0.2); 205 | backdrop-filter: blur(1.5rem); 206 | } 207 | a.splash-card img { 208 | display: block; 209 | position: absolute; 210 | top: 0.75rem; 211 | left: 0.75rem; 212 | width: 3.5rem; 213 | height: 3.5rem; 214 | border-radius: 0.25rem; 215 | float: left; 216 | } 217 | .splash-card > * { 218 | margin: 0 0.25rem 0.25rem 0 !important; 219 | } 220 | .splash-card > h3 { 221 | font-size: 0.875rem; 222 | margin-bottom: 0.0625rem !important; 223 | } 224 | 225 | /* News elements */ 226 | 227 | [data-news] { 228 | display: flex; 229 | flex-wrap: wrap; 230 | margin-right: -1rem; 231 | } 232 | [data-news] [data-article] { 233 | flex: 0 1 calc(50% - 1rem); 234 | display: flex; 235 | flex-direction: column; 236 | margin: 0 1rem 1rem 0; 237 | padding: 0 1rem 1rem 0; 238 | border-bottom: 1px solid var(--md-default-fg-color--lightest); 239 | } 240 | [data-article] > * { 241 | margin: 0.25rem 0; 242 | } 243 | [data-article] > :first-child { 244 | font-family: var(--fHeading); 245 | font-size: 0.8rem; 246 | /* flex-grow: 1; */ 247 | } 248 | [data-article] > :nth-child(2):not(:last-child) { 249 | font-size: 0.875em; 250 | line-height: 1.4; 251 | display: -webkit-box; 252 | -webkit-line-clamp: 3; 253 | -webkit-box-orient: vertical; 254 | overflow: hidden; 255 | text-overflow: ellipsis; 256 | max-height: 2.8em; 257 | position: relative; 258 | } 259 | [data-article] > :nth-child(2):not(:last-child)::after { 260 | content: ""; 261 | position: absolute; 262 | display: block; 263 | right: 0; 264 | bottom: 0; 265 | width: 4rem; 266 | height: 1.4em; 267 | background: linear-gradient(to right, transparent 0%, var(--md-default-bg-color) 50%); 268 | } 269 | [data-article] > :last-child > * { 270 | margin-right: 1em; 271 | } 272 | [data-article] a:link { 273 | font-family: var(--fHeading); 274 | font-size: 0.6818rem; 275 | font-weight: bold; 276 | text-decoration: none; 277 | } 278 | 279 | /* Conditionals */ 280 | 281 | @media screen and (max-width: 76.1875em) { 282 | .md-nav--primary .md-nav__title[for=__drawer], 283 | .md-nav--primary .md-nav__title { 284 | background-color: var(--stone800); 285 | } 286 | } 287 | @media screen and (max-width: 55em) { 288 | .splash.header img { 289 | right: -2rem; 290 | opacity: 0.2; 291 | } 292 | } 293 | @media screen and (max-width: 45em) { 294 | .splash { 295 | flex-direction: column; 296 | } 297 | [data-grid] [data-banner], 298 | [data-news] [data-article] { 299 | flex: 1 1 100%; 300 | } 301 | } -------------------------------------------------------------------------------- /docs/css/osano.css: -------------------------------------------------------------------------------- 1 | /* General styling */ 2 | 3 | .osano-cm-window { 4 | font-family: "Roboto", Arial, Helvetica, sans-serif; 5 | font-size: 20px; 6 | } 7 | .osano-cm-dialog--type_bar { 8 | justify-content: center; 9 | color: #000; 10 | background: #fff; 11 | box-shadow: 0 0 0 100vmax rgba(0,0,0,0.66) 12 | } 13 | 14 | .osano-cm-dialog { 15 | font-size: 0.75em; 16 | padding: 2em 1em; 17 | color: var(--md-typeset-color); 18 | background: var(--md-footer-bg-color--dark); 19 | } 20 | .osano-cm-header, 21 | .osano-cm-info-dialog-header { 22 | background: var(--md-default-bg-color); 23 | } 24 | .osano-cm-link, 25 | .osano-cm-disclosure__toggle, 26 | .osano-cm-expansion-panel__toggle { 27 | color: var(--md-typeset-a-color); 28 | } 29 | .osano-cm-link:hover, 30 | .osano-cm-link:active, 31 | .osano-cm-disclosure__toggle:hover, 32 | .osano-cm-disclosure__toggle:active, 33 | .osano-cm-disclosure__toggle:focus, 34 | .osano-cm-expansion-panel__toggle:hover, 35 | .osano-cm-expansion-panel__toggle:active, 36 | .osano-cm-expansion-panel__toggle:focus { 37 | color: var(--md-accent-fg-color); 38 | } 39 | .osano-cm-drawer-links { 40 | display: inline-block; 41 | } 42 | .osano-cm-link.osano-cm-storage-policy { 43 | margin-right: 0.5em; 44 | } 45 | .osano-cm-description { 46 | font-weight: 400; 47 | } 48 | .osano-cm-info { 49 | color: var(--md-typeset-color); 50 | background: var(--md-default-bg-color); 51 | box-shadow: unset; 52 | } 53 | .osano-cm-dialog--hidden, 54 | .osano-cm-info-dialog--hidden { 55 | transition-delay: 0ms, 0ms; 56 | } 57 | .osano-cm-disclosure { 58 | padding-top: 0; 59 | } 60 | .osano-cm-disclosure--collapse { 61 | border-color: var(--md-default-fg-color--lightest); 62 | } 63 | 64 | /* Closing button */ 65 | 66 | .osano-cm-dialog__close, 67 | .osano-cm-dialog__close:hover, 68 | .osano-cm-dialog__close:focus, 69 | .osano-cm-dialog__close:focus:hover { 70 | color: var(--md-typeset-color); 71 | stroke: var(--md-typeset-color); 72 | border-color: transparent; 73 | outline: initial; 74 | } 75 | .osano-cm-dialog__close:focus { 76 | background-color: var(--md-default-fg-color--lightest); 77 | } 78 | .osano-cm-close { 79 | padding: 0.25em; 80 | margin: 0.5em; 81 | stroke-width: 2px; 82 | border-width: 2px; 83 | opacity: 0.4; 84 | } 85 | .osano-cm-close:focus, 86 | .osano-cm-close:hover { 87 | stroke-width: 2px; 88 | opacity: 1; 89 | } 90 | .osano-cm-info-dialog-header__close:focus { 91 | background-color: var(--md-typeset-color); 92 | } 93 | 94 | /* Switch buttons */ 95 | 96 | .osano-cm-toggle__switch { 97 | background-color: var(--md-default-fg-color--lightest); 98 | transition: all 0.1s ease-out; 99 | } 100 | .osano-cm-toggle__input:hover + .osano-cm-toggle__switch { 101 | background-color: var(--md-default-fg-color--light); 102 | border-color: transparent; 103 | } 104 | .osano-cm-toggle__input:focus + .osano-cm-toggle__switch { 105 | background-color: var(--md-default-fg-color--lightest); 106 | border-color: transparent; 107 | } 108 | .osano-cm-toggle__input:focus + .osano-cm-toggle__switch::before { 109 | border-color: var(--md-accent-fg-color); 110 | } 111 | .osano-cm-toggle__input:focus:hover + .osano-cm-toggle__switch { 112 | background-color: var(--md-default-fg-color--light); 113 | border-color: transparent; 114 | } 115 | .osano-cm-toggle__input:checked + .osano-cm-toggle__switch, 116 | .osano-cm-toggle__input:disabled:checked + .osano-cm-toggle__switch { 117 | background-color: var(--md-primary-fg-color); 118 | border-color: var(--md-primary-fg-color); 119 | } 120 | .osano-cm-toggle__input:checked:hover + .osano-cm-toggle__switch, 121 | .osano-cm-toggle__input:disabled:checked:hover + .osano-cm-toggle__switch { 122 | background-color: var(--md-accent-fg-color); 123 | border-color: var(--md-accent-fg-color); 124 | } 125 | .osano-cm-toggle__input:checked:focus + .osano-cm-toggle__switch, 126 | .osano-cm-toggle__input:disabled:checked:focus + .osano-cm-toggle__switch { 127 | background-color: var(--md-primary-fg-color); 128 | border-color: var(--md-primary-fg-color); 129 | } 130 | .osano-cm-toggle__input:checked:focus + .osano-cm-toggle__switch::before { 131 | border-color: var(--md-accent-fg-color); 132 | } 133 | .osano-cm-toggle__input:checked:focus:hover + .osano-cm-toggle__switch { 134 | background-color: var(--md-accent-fg-color); 135 | border-color: var(--md-accent-fg-color); 136 | } 137 | .osano-cm-toggle__input:disabled:checked + .osano-cm-toggle__switch, 138 | .osano-cm-toggle__input:disabled:checked:focus + .osano-cm-toggle__switch, 139 | .osano-cm-toggle__input:disabled:checked:hover + .osano-cm-toggle__switch { 140 | opacity: 0.3; 141 | cursor: not-allowed; 142 | } 143 | .osano-cm-toggle__input + .osano-cm-toggle__switch::after { 144 | background-color: var(--md-default-bg-color) !important; 145 | } 146 | .osano-cm-toggle__input:checked + .osano-cm-toggle__switch::before { 147 | border-color: transparent; 148 | } 149 | .osano-cm-list { 150 | gap: 0.75em; 151 | } 152 | 153 | /* CTA Buttons */ 154 | 155 | .osano-cm-dialog__buttons { 156 | display: flex; 157 | justify-content: flex-start; 158 | flex-wrap: wrap; 159 | gap: 0.5em 0.75em; 160 | } 161 | .osano-cm-button { 162 | font-family: var(--fHeading); 163 | flex: 1 1 20em; 164 | color: var(--md-primary-fg-color); 165 | background-color: transparent; 166 | border-width: 2px; 167 | border-color: var(--md-primary-fg-color); 168 | border-radius: 20em; 169 | } 170 | .osano-cm-button:hover { 171 | color: var(--md-accent-fg-color); 172 | background-color: transparent; 173 | border-color: var(--md-accent-fg-color); 174 | } 175 | 176 | /* Widget */ 177 | 178 | .osano-cm-widget { 179 | display: none; 180 | opacity: 0.5; 181 | border-radius: 10em; 182 | bottom: 3em; 183 | } 184 | .osano-cm-widget:focus { 185 | outline-offset: 0.125em; 186 | outline-color: var(--md-default-fg-color--lighter); 187 | outline-width: 0.1875em; 188 | } 189 | .osano-cm-widget__outline { 190 | fill: transparent; 191 | stroke: var(--md-typeset-color); 192 | } 193 | .osano-cm-widget__dot { 194 | fill: var(--md-typeset-color); 195 | } 196 | 197 | /* Media conditions */ 198 | 199 | @media screen and (min-width: 768px) { 200 | .osano-cm-dialog--type_bar .osano-cm-dialog__content { 201 | max-width: 50em; 202 | } 203 | .osano-cm-dialog--type_bar .osano-cm-dialog__buttons { 204 | max-width: 20em; 205 | } 206 | } -------------------------------------------------------------------------------- /docs/css/percona.css: -------------------------------------------------------------------------------- 1 | [data-md-color-scheme="percona-light"] { 2 | --md-primary-fg-color: #0d184c; 3 | --md-primary-fg-color--light: #3e4875; 4 | --md-default-fg-color--lightest: #9096b0; 5 | --md-primary-fg-color--dark: #080e2e; 6 | --md-typeset-a-color: #2cbea2; 7 | } 8 | [data-md-color-scheme="slate"] { 9 | --md-primary-fg-color: #0d184c; 10 | /* 11 | --md-primary-fg-color--light: #3e4875; 12 | --md-primary-fg-color--dark: #080e2e; 13 | */ 14 | --md-typeset-a-color: #2cbea2; 15 | --md-hue: 210; /* [0, 360] */ 16 | } 17 | ul li p { 18 | margin: 0; 19 | } 20 | 21 | .md-clipboard { 22 | color: #2cbea2; 23 | } 24 | 25 | .md-typeset { 26 | font-size: .7rem; 27 | line-height: 1.5; 28 | } 29 | 30 | .md-typeset h1 { 31 | color: var(--md-default-fg-color--light); 32 | font-size: 2em; 33 | font-weight: 400; 34 | line-height: 1.3; 35 | margin: 0 0 0.9em; 36 | } 37 | 38 | .md-typeset h2 { 39 | font-size: 1.5625em; 40 | line-height: 1.4; 41 | margin: 1em 0 .54em; 42 | } 43 | 44 | .md-typeset .md-button { 45 | border: .1rem solid; 46 | border-radius: 50px; 47 | color: var(--md-typeset-a-color); 48 | cursor: pointer; 49 | display: inline-block; 50 | font-weight: 700; 51 | padding: .625em 2em; 52 | transition:color 125ms, background-color 125ms, border-color 125ms 53 | } 54 | 55 | .md-typeset .md-button--primary { 56 | background-color: var(--md-typeset-a-color); 57 | border-color: var(--md-typeset-a-color); 58 | color:var(--md-primary-bg-color) 59 | } 60 | 61 | .md-typeset .md-button:focus, .md-typeset .md-button:hover { 62 | background-color: var(--md-accent-fg-color); 63 | border-color: var(--md-accent-fg-color); 64 | color:var(--md-accent-bg-color) 65 | } 66 | 67 | /*.git-revision-date-localized-plugin:before { 68 | content: url('https://api.iconify.design/mdi/clock-edit-outline.svg'); 69 | }*/ 70 | -------------------------------------------------------------------------------- /docs/css/postgresql.css: -------------------------------------------------------------------------------- 1 | /* Overrides */ 2 | 3 | :root { 4 | --md-primary-fg-color--dark: var(--night400); 5 | } 6 | .md-header, 7 | .md-tabs { 8 | background: 9 | -o-linear-gradient( 10 | 340deg, 11 | rgba(0,0,0,0.3) 33%, 12 | rgba(0,0,0,0.2) 95% 13 | ), 14 | -o-linear-gradient( 15 | 340deg, 16 | rgb(78,91,150) 33%, 17 | rgb(67,158,255) 95% 18 | ); 19 | background: 20 | linear-gradient( 21 | 110deg, 22 | rgba(0,0,0,0.3) 33%, 23 | rgba(0,0,0,0.2) 95% 24 | ), 25 | linear-gradient( 26 | 110deg, 27 | rgb(78,91,150) 33%, 28 | rgb(67,158,255) 95% 29 | ); 30 | } 31 | @media screen and (max-width: 76.1875em) { 32 | .md-nav--primary .md-nav__title[for="__drawer"], 33 | .md-nav--primary .md-nav__title { 34 | background: 35 | -o-linear-gradient( 36 | 340deg, 37 | rgba(0,0,0,0.3) 33%, 38 | rgba(0,0,0,0.2) 95% 39 | ), 40 | -o-linear-gradient( 41 | 340deg, 42 | rgb(78,91,150) 33%, 43 | rgb(67,158,255) 95% 44 | ); 45 | background: 46 | linear-gradient( 47 | 110deg, 48 | rgba(0,0,0,0.3) 33%, 49 | rgba(0,0,0,0.2) 95% 50 | ), 51 | linear-gradient( 52 | 110deg, 53 | rgb(78,91,150) 33%, 54 | rgb(67,158,255) 95% 55 | ); 56 | } 57 | } 58 | .superNav, 59 | .md-nav__source { 60 | background-color: var(--night500); 61 | } -------------------------------------------------------------------------------- /docs/css/toctree.css: -------------------------------------------------------------------------------- 1 | .sphinxsidebarwrapper { 2 | padding-right: 0 !important; 3 | } 4 | /* Turns off bullets within toctree */ 5 | .sphinxsidebarwrapper ul { 6 | list-style: none; 7 | } 8 | .sphinxsidebarwrapper>ul { 9 | padding-left: 0; 10 | } 11 | .sphinxsidebarwrapper>ul>li { 12 | padding: 0 0 10px 0; 13 | margin: 0; 14 | } 15 | .custom-button { 16 | cursor: pointer; 17 | display: inline-flex; 18 | justify-content: center; 19 | align-items: center; 20 | width: 10px; 21 | margin-right: 5px; 22 | margin-bottom: 0; 23 | font-size: 18px; 24 | font-weight: 400; 25 | border: none; 26 | background-color: transparent; 27 | outline: none; 28 | } 29 | 30 | .custom-button~ul { 31 | display: none; 32 | } 33 | 34 | .custom-button--main-active { 35 | background-color: #e3e3e3 36 | } 37 | 38 | .custom-button.custom-button--active~ul { 39 | display: block; 40 | } 41 | 42 | .custom-button:before { 43 | content: '+'; 44 | } 45 | 46 | .custom-button.custom-button--active:before { 47 | content: '-'; 48 | } 49 | -------------------------------------------------------------------------------- /docs/enable-extensions.md: -------------------------------------------------------------------------------- 1 | # Enable Percona Distribution for PostgreSQL components 2 | 3 | Some components require additional configuration before using them with Percona Distribution for PostgreSQL. This sections provides configuration instructions per component. 4 | 5 | ## Patroni 6 | 7 | Patroni is the high availability solution for PostgreSQL. The [High Availability in PostgreSQL with Patroni](solutions/high-availability.md) chapter provides details about the solution overview and architecture deployment. 8 | 9 | While setting up a high availability PostgreSQL cluster with Patroni, you will need the following components: 10 | 11 | - Patroni installed on every ``postresql`` node. 12 | 13 | - 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. 14 | 15 | - [HAProxy :octicons-link-external-16:](http://www.haproxy.org/). 16 | 17 | If you install the software fom packages, all required dependencies and service unit files are included. If you [install the software from the tarballs](tarball.md), you must first enable `etcd`. See the steps in the [etcd](#etcd) section in this document. 18 | 19 | See the configuration guidelines for [Debian and Ubuntu](solutions/ha-setup-apt.md) and [RHEL and CentOS](solutions/ha-setup-yum.md). 20 | 21 | ## etcd 22 | 23 | If you [installed etcd from binary tarballs](tarball.md), you need to create the `etcd.service` file. This file allows `systemd` to start, stop, restart, and manage the `etcd` service. This includes handling dependencies, monitoring the service, and ensuring it runs as expected. 24 | 25 | ```ini title="/etc/systemd/system/etcd.service" 26 | [Unit] 27 | After=network.target 28 | Description=etcd - highly-available key value store 29 | 30 | [Service] 31 | LimitNOFILE=65536 32 | Restart=on-failure 33 | Type=notify 34 | ExecStart=/usr/bin/etcd --config-file /etc/etcd/etcd.conf.yaml 35 | User=etcd 36 | 37 | [Install] 38 | WantedBy=multi-user.target 39 | ``` 40 | 41 | 42 | 43 | ## pgBadger 44 | 45 | Enable the following options in `postgresql.conf` configuration file before starting the service: 46 | 47 | ``` 48 | log_min_duration_statement = 0 49 | log_line_prefix = '%t [%p]: ' 50 | log_checkpoints = on 51 | log_connections = on 52 | log_disconnections = on 53 | log_lock_waits = on 54 | log_temp_files = 0 55 | log_autovacuum_min_duration = 0 56 | log_error_verbosity = default 57 | ``` 58 | 59 | For details about each option, see [pdBadger documentation :octicons-link-external-16:](https://github.com/darold/pgbadger/#POSTGRESQL-CONFIGURATION). 60 | 61 | ## pgaudit 62 | 63 | Add the `pgaudit` 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/{{pgversion}}/sql-altersystem.html) command. [Connect to psql](connect.md) and use the following command: 64 | 65 | ```sql 66 | ALTER SYSTEM SET shared_preload_libraries = 'pgaudit'; 67 | ``` 68 | 69 | Start / restart the server to apply the configuration. 70 | 71 | To configure `pgaudit`, you must have the privileges of a superuser. You can specify the settings in one of these ways: 72 | 73 | * globally (in postgresql.conf or using ALTER SYSTEM ... SET), 74 | * at the database level (using ALTER DATABASE ... SET), 75 | * at the role level (using ALTER ROLE ... SET). Note that settings are not inherited through normal role inheritance and SET ROLE will not alter a user's pgAudit settings. This is a limitation of the roles system and not inherent to pgAudit. 76 | 77 | Refer to the [pgaudit documentation](https://github.com/pgaudit/pgaudit/blob/master/README.md#settings) for details about available settings. 78 | 79 | To enable `pgaudit`, connect to psql and run the CREATE EXTENSION command: 80 | 81 | ```sql 82 | CREATE EXTENSION pgaudit; 83 | ``` 84 | 85 | ## pgaudit set-user 86 | 87 | 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/{{pgversion}}/sql-altersystem.html) command. [Connect to psql](connect.md) and use the following command: 88 | 89 | ```sql 90 | ALTER SYSTEM SET shared_preload_libraries = 'set-user'; 91 | ``` 92 | 93 | Start / restart the server to apply the configuration. 94 | 95 | Install the extension into your database: 96 | 97 | ```sql 98 | psql 99 | CREATE EXTENSION set_user; 100 | ``` 101 | 102 | 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. 103 | 104 | ## pgbouncer 105 | 106 | `pgbouncer` requires the `pgbouncer.ini` configuration file to start. The default path is `/etc/pgbouncer/pgbouncer.ini`. When installing `pgbouncer` from a [tarball](tarball.md), the path is `percona-pgbouncer/etc/pgbouncer.ini`. 107 | 108 | Find detailed information about configuration file options in the [`pgbouncer documentation`](https://www.pgbouncer.org/config.html). 109 | 110 | ## pgpool2 111 | 112 | `pgpool-II` requires the configuration file to start. When you install pgpool from a package, the configuration file is automatically created for you at the path `/etc/pgpool2/pgpool.conf` on Debian and Ubuntu and `/etc/pgpool-II/pgpool.conf` on RHEL and derivatives. 113 | 114 | When you installed pgpool from tarballs, you can use the sample configuration file `/percona-pgpool-II/etc/pgpool2/pgpool.conf.sample`: 115 | 116 | ```{.bash data-prompt="$"} 117 | $ cp /percona-pgpool-II/etc/pgpool2/pgpool.conf.sample /pgpool.conf 118 | ``` 119 | 120 | Specify the path to it when starting pgpool: 121 | 122 | ```{.bash data-prompt="$"} 123 | $ pgpool -f /pgpool.conf 124 | ``` 125 | 126 | ## pg_stat_monitor 127 | 128 | Please refer to [`pg_stat_monitor`](https://docs.percona.com/pg-stat-monitor/setup.html) for setup steps. 129 | 130 | ## wal2json 131 | 132 | After the installation, enable the following option in `postgresql.conf` configuration file before starting the service: 133 | 134 | ``` 135 | wal_level = logical 136 | ``` 137 | 138 | Start / restart the server to apply the changes. 139 | 140 | ## pgvector 141 | 142 | To get started, enable the extension for the database where you want to use it: 143 | 144 | ```sql 145 | CREATE EXTENSION vector; 146 | ``` 147 | 148 | ## Next steps 149 | 150 | [Connect to PostgreSQL :material-arrow-right:](connect.md){.md-button} 151 | 152 | -------------------------------------------------------------------------------- /docs/extensions.md: -------------------------------------------------------------------------------- 1 | # Extensions 2 | 3 | Percona Distribution for PostgreSQL is not only [Percona Server for PostgreSQL](postgresql-server.md). It also includes extensions - the add-ons that enhance the functionality of PostgreSQL database. By installing these extensions, you can modify and extend your database server with new features, functions, and data types. 4 | 5 | Percona Distribution for PostgreSQL includes the extensions that have been tested to work together. These extensions encompass the following: 6 | 7 | * [PostgreSQL contrib modules and utilities](contrib.md) 8 | * [Extensions authored by Percona](percona-ext.md) 9 | * [Third-party components](third-party.md) 10 | 11 | Percona also supports [extra modules](https://repo.percona.com/ppg-17-extras/), not included in Percona Distribution for PostgreSQL but tested to work with it. 12 | 13 | Additionally, see the list of [PostgreSQL software](https://www.percona.com/services/support/support-tiers-postgresql) covered by Percona Support. 14 | 15 | ## Install an extension 16 | 17 | 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. 18 | 19 | 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. 20 | -------------------------------------------------------------------------------- /docs/fonts/Poppins-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/fonts/Poppins-Italic.ttf -------------------------------------------------------------------------------- /docs/fonts/Poppins-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/fonts/Poppins-Light.ttf -------------------------------------------------------------------------------- /docs/fonts/Poppins-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/fonts/Poppins-LightItalic.ttf -------------------------------------------------------------------------------- /docs/fonts/Poppins-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/fonts/Poppins-Medium.ttf -------------------------------------------------------------------------------- /docs/fonts/Poppins-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/fonts/Poppins-MediumItalic.ttf -------------------------------------------------------------------------------- /docs/fonts/Poppins-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/fonts/Poppins-Regular.ttf -------------------------------------------------------------------------------- /docs/fonts/Poppins-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/fonts/Poppins-SemiBold.ttf -------------------------------------------------------------------------------- /docs/fonts/Poppins-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/percona/postgresql-docs/25dd48fe07fa20c7b6b49cb457b1fd90f795f457/docs/fonts/Poppins-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /docs/get-help.md: -------------------------------------------------------------------------------- 1 | # Get help from Percona 2 | 3 | Our documentation guides are packed with information, but they can’t cover everything you need to know about Percona Distribution for PostgreSQL. They also won’t cover every scenario you might come across. Don’t be afraid to try things out and ask questions when you get stuck. 4 | 5 | ## Percona's Community Forum 6 | 7 | Be a part of a space where you can tap into a wealth of knowledge from other database enthusiasts and experts who work with Percona’s software every day. While our service is entirely free, keep in mind that response times can vary depending on the complexity of the question. You are engaging with people who genuinely love solving database challenges. 8 | 9 | We recommend visiting our [Community Forum](https://forums.percona.com/t/welcome-to-perconas-community-forum/7){:target="_blank"}. It’s an excellent place for discussions, technical insights, and support around Percona database software. If you’re new and feeling a bit unsure, our [FAQ](https://forums.percona.com/faq){:target="_blank"} and [Guide for New Users](https://forums.percona.com/t/faq-guide-for-new-users/8562){:target="_blank"} ease you in. 10 | 11 | If you have thoughts, feedback, or ideas, the community team would like to hear from you at [Any ideas on how to make the forum better?](https://forums.percona.com/t/any-ideas-on-how-to-make-the-forum-better/11522){:target="blank"}. We’re always excited to connect and improve everyone's experience. 12 | 13 | ## Percona experts 14 | 15 | Percona experts bring years of experience in tackling tough database performance issues and design challenges. 16 | 17 |
    18 | We understand your challenges when managing complex database environments. That's why we offer various services to help you simplify your operations and achieve your goals. 19 | 20 | | Service | Description | 21 | |----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| 22 | | 24/7 Expert Support | Our dedicated team of database experts is available 24/7 to assist you with any database issues. We provide flexible support plans tailored to your specific needs. | 23 | | Hands-On Database Management | Our managed services team can take over the day-to-day management of your database infrastructure, freeing up your time to focus on other priorities. | 24 | | Expert Consulting | Our experienced consultants provide guidance on database topics like architecture design, migration planning, performance optimization, and security best practices. | 25 | | Comprehensive Training | Our training programs help your team develop skills to manage databases effectively, offering virtual and in-person courses. | 26 | 27 | We're here to help you every step of the way. Whether you need a quick fix or a long-term partnership, we're ready to provide our expertise and support. 28 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # Percona Distribution for PostgreSQL 17 Documentation 2 | 3 | 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. 4 | 5 | Percona Distribution for PostgreSQL includes [Percona Server for PostgreSQL](postgresql-server.md) packaged 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. 6 | 7 | Part of the solution, Percona Operator for PostgreSQL, makes it easy to orchestrate the cluster reliably and repeatably in Kubernetes. 8 | 9 | [What's included in Percona Distribution for PostgreSQL? :material-arrow-right:](extensions.md){.md-button} 10 | 11 | ## What’s in it for you? 12 | 13 | - No vendor lock in - all components of Percona Distribution for PostgreSQL are fully open source 14 | - No guesswork on finding the right version of a component – they all undergo thorough testing to ensure compatibility 15 | - Freely available reference architectures for solutions like high-availability, backups and disaster recovery 16 | - Spatial data handling support via PostGIS 17 | - 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 18 | - 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 19 | - Automate PostgreSQL provisioning and management in Kubernetes, in the cloud or on-premises with [Percona Everest :octicons-link-external-16:](https://docs.percona.com/everest/index.html#why-percona-everest) - the cloud-native database platform 20 | 21 |
    22 | 23 | ### :material-progress-download: Installation guides { .title } 24 | 25 | Get started quickly with the step-by-step installation instructions. 26 | 27 | [Quickstart guides :material-arrow-right:](installing.md){ .md-button } 28 | 29 |
    30 | 31 | ### :fontawesome-solid-gears: Solutions { .title } 32 | 33 | 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. 34 | 35 | [Solutions :material-arrow-right:](solutions.md){ .md-button } 36 | 37 |
    38 | 39 | ### :material-frequently-asked-questions: Troubleshooting and FAQ { .title } 40 | 41 | Our comprehensive resources will help you overcome challenges, from everyday issues to specific doubts. 42 | 43 | [Troubleshooting :material-arrow-right:](troubleshooting.md){.md-button} 44 | 45 |
    46 | 47 | ### :loudspeaker: What's new? { .title } 48 | 49 | Learn about the releases and changes in the Distribution. 50 | 51 | [Release notes :material-arrow-right:]({{release}}.md){.md-button} 52 |
    53 |
    54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/installing.md: -------------------------------------------------------------------------------- 1 | # Quickstart guide 2 | 3 | Percona Distribution for PostgreSQL is the Percona server for PostgreSQL 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). 4 | 5 | This document aims to guide database application developers and DevOps engineers 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: 6 | 7 | * Connect to PostgreSQL using the `psql` interactive terminal 8 | * Interact with PostgreSQL with basic psql commands 9 | * Manipulate data in PostgreSQL 10 | * Understand the next steps you can take as a database application developer or administrator to expand your knowledge of Percona Distribution for PostgreSQL 11 | 12 | ## Install Percona Distribution for PostgreSQL 13 | 14 | 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. 15 | 16 | === ":octicons-terminal-16: Package manager" 17 | 18 | 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). 19 | 20 | If you are on Debian or Ubuntu, use `apt` for installation. 21 | 22 | If you are on Red Hat Enterprise Linux or compatible derivatives, use `yum`. 23 | 24 | [Install via apt :material-arrow-right:](apt.md){.md-button} 25 | [Install via yum :material-arrow-right:](yum.md){.md-button} 26 | 27 | === ":simple-docker: Docker" 28 | 29 | Get our image from Docker Hub and spin up a cluster on a Docker container for quick evaluation. 30 | 31 | Check below to get access to a detailed step-by-step guide. 32 | 33 | [Run in Docker :material-arrow-right:](docker.md){.md-button} 34 | 35 | === ":simple-kubernetes: Kubernetes" 36 | 37 | **Percona Operator for Kubernetes** is a controller introduced to simplify complex deployments that require meticulous and secure database expertise. 38 | 39 | Check below to get access to a detailed step-by-step guide. 40 | 41 | [Get started with Percona Operator :octicons-link-external-16:](https://docs.percona.com/percona-operator-for-postgresql/2.0/quickstart.html){.md-button} 42 | 43 | === ":octicons-download-16: Tar download (not recommended)" 44 | 45 | If installing the package (the **recommended** method for a safe, secure, and reliable setup) is not an option, refer to the link below for step-by-step instructions on installing from tarballs using the provided download links. 46 | 47 | In this scenario, you must ensure that all dependencies are met. Failure to do so may result in errors or crashes. 48 | 49 | !!! note 50 | 51 | This method is **not recommended** for mission-critical environments. 52 | [Install from tarballs :material-arrow-right:](tarball.md){.md-button} 53 | -------------------------------------------------------------------------------- /docs/js/consent.js: -------------------------------------------------------------------------------- 1 | var consent = __md_get("__consent") 2 | if (consent && consent.custom) { 3 | /* The user accepted the cookie */ 4 | } else { 5 | /* The user rejected the cookie */ 6 | } -------------------------------------------------------------------------------- /docs/js/promptremover.js: -------------------------------------------------------------------------------- 1 | document.addEventListener("DOMContentLoaded", function(){ 2 | // get collection of code blocks: 3 | const collection = document.getElementsByClassName("highlight"); 4 | for (let i = 0; i < collection.length; i++) { 5 | const commandElement=collection.item(i); 6 | let commandButtonElement = commandElement.getElementsByTagName("button"); 7 | // read the prompt string from an attribute of the code block: 8 | let promptString = commandElement.getAttribute("data-prompt"); 9 | if (!promptString) continue; 10 | let commandCodeElement = commandElement.getElementsByTagName("code"); 11 | let commandCodeElementString = commandCodeElement.item(0).textContent; 12 | let trueCommand = commandCodeElementString; 13 | if (commandCodeElementString.startsWith(promptString)) { 14 | // remove the first occurrence of the prompt: 15 | trueCommand = commandCodeElementString.substring(promptString.length, commandCodeElementString.length).trim(); 16 | } 17 | // remove other occurrencies in case of a multi-line string: 18 | trueCommand = trueCommand.replaceAll("\n"+promptString, "\n").replace(/^[^\S\r\n]+/gm, ""); 19 | 20 | // CHECK IF THERE IS A SECOND PROMPT: 21 | promptString = commandElement.getAttribute("data-prompt-second"); 22 | if (promptString) { 23 | if (trueCommand.startsWith(promptString)) { 24 | trueCommand = trueCommand.substring(promptString.length, trueCommand.length).trim(); 25 | } 26 | trueCommand = trueCommand.replaceAll("\n"+promptString, "\n").replace(/^[^\S\r\n]+/gm, ""); 27 | } 28 | 29 | // CHECK IF THERE IS A THIRD PROMPT: 30 | promptString = commandElement.getAttribute("data-prompt-third"); 31 | if (promptString) { 32 | if (trueCommand.startsWith(promptString)) { 33 | trueCommand = trueCommand.substring(promptString.length, trueCommand.length).trim(); 34 | } 35 | trueCommand = trueCommand.replaceAll("\n"+promptString, "\n").replace(/^[^\S\r\n]+/gm, ""); 36 | } 37 | // attach the updated command as an attribute to the button where clipboard.js will find it: 38 | commandButtonElement.item(0).setAttribute("data-clipboard-text", trueCommand); 39 | } 40 | }); 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /docs/js/version-select.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Custom version of same taken from mike code for injecting version switcher into percona.com 3 | */ 4 | 5 | window.addEventListener('DOMContentLoaded', function () { 6 | // This is a bit hacky. Figure out the base URL from a known CSS file the 7 | // template refers to... 8 | var ex = new RegExp('/?css/version-select.css$'); 9 | var sheet = document.querySelector('link[href$="version-select.css"]'); 10 | 11 | if (!sheet) { 12 | return; 13 | } 14 | 15 | var ABS_BASE_URL = sheet.href.replace(ex, ''); 16 | var CURRENT_VERSION = ABS_BASE_URL.split('/').pop(); 17 | 18 | function makeSelect(options, selected) { 19 | var select = document.createElement('select'); 20 | select.classList.add('btn'); 21 | select.classList.add('btn-primary'); 22 | 23 | options.forEach(function (i) { 24 | var option = new Option(i.text, i.value, undefined, i.value === selected); 25 | select.add(option); 26 | }); 27 | 28 | return select; 29 | } 30 | 31 | var xhr = new XMLHttpRequest(); 32 | xhr.open('GET', ABS_BASE_URL + '/../versions.json'); 33 | xhr.onload = function () { 34 | var versions = JSON.parse(this.responseText); 35 | 36 | var realVersion = versions.find(function (i) { 37 | return ( 38 | i.version === CURRENT_VERSION || i.aliases.includes(CURRENT_VERSION) 39 | ); 40 | }).version; 41 | 42 | var select = makeSelect( 43 | versions.map(function (i) { 44 | return { text: i.title, value: i.version }; 45 | }), 46 | realVersion 47 | ); 48 | select.addEventListener('change', function (event) { 49 | window.location.href = ABS_BASE_URL + '/../' + this.value; 50 | }); 51 | 52 | var container = document.createElement('div'); 53 | container.id = 'custom_select'; 54 | container.classList.add('side-column-block'); 55 | 56 | // Add menu 57 | container.appendChild(select); 58 | 59 | var sidebar = document.querySelector('#version-select-wrapper'); // Inject menu into element with this ID 60 | sidebar.appendChild(container); 61 | }; 62 | 63 | xhr.send(); 64 | }); -------------------------------------------------------------------------------- /docs/ldap.md: -------------------------------------------------------------------------------- 1 | # LDAP Authentication 2 | 3 | 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**. 4 | 5 | Percona Distribution for PortgreSQL supports several [authentication methods :octicons-link-external-16:](https://www.postgresql.org/docs/{{pgversion}}/auth-methods.html), including the [LDAP authentication :octicons-link-external-16:](https://www.postgresql.org/docs/{{pgversion}}/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. 6 | 7 | The LDAP authentication in Percona Distribution for PortgreSQL is implemented the same way as in upstream PostgreSQL. -------------------------------------------------------------------------------- /docs/licensing.md: -------------------------------------------------------------------------------- 1 | # Copyright and licensing information 2 | 3 | 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. 4 | 5 | ## Documentation licensing 6 | 7 | Percona Distribution for PostgreSQL documentation is (C)2009-2023 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/). 8 | -------------------------------------------------------------------------------- /docs/migration.md: -------------------------------------------------------------------------------- 1 | # Migrate from PostgreSQL to Percona Distribution for PostgreSQL 2 | 3 | 4 | Percona Distribution for PostgreSQL includes the PostgreSQL database and additional extensions that have been selected to cover the needs of the enterprise and are guaranteed to work together. Percona Distribution for PostgreSQL is available as a software collection that is easy to deploy. 5 | 6 | We encourage users to migrate from their PostgreSQL deployments based on community binaries to Percona Distribution for PostgreSQL. This document provides the migration instructions. 7 | 8 | Depending on your business requirements, you may migrate to Percona Distribution for PostgreSQL either [on the same server](#migrate-on-the-same-server) or [onto a different server](#migrate-on-a-different-server). 9 | 10 | ## Migrate on the same server 11 | 12 | === ":material-debian: :material-debian: On Debian and Ubuntu Linux" 13 | 14 | >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_. 15 | 16 | Run **all** commands as root or via **sudo**: 17 | {.power-number} 18 | 19 | 1. Stop the `postgresql` server 20 | 21 | ```{.bash data-prompt="$"} 22 | $ sudo systemctl stop postgresql.service 23 | ``` 24 | 25 | 2. Remove community packages 26 | 27 | ```{.bash data-prompt="$"} 28 | $ sudo apt-get --purge remove postgresql 29 | ``` 30 | 31 | 3. [Install percona-release :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html) 32 | 4. Enable the repository 33 | 34 | ```{.bash data-prompt="$"} 35 | $ sudo percona-release setup ppg{{pgversion}} 36 | ``` 37 | 38 | 5. [Install Percona Distribution for PostgreSQL packages](apt.md) 39 | 6. (Optional) Restore the data from the backup. 40 | 7. Start the `postgresql` service. The installation process starts and initializes the default cluster automatically. You can check its status with: 41 | 42 | ```{.bash data-prompt="$"} 43 | $ sudo systemctl status postgresql 44 | ``` 45 | 46 | If `postresql` service is not started, start it manually: 47 | 48 | ```{.bash data-prompt="$"} 49 | $ sudo systemctl start postgresql.service 50 | ``` 51 | 52 | 53 | === ":material-redhat: On RHEL and derivatives" 54 | 55 | > 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. 56 | 57 | Run **all** commands as root or via **sudo**: 58 | {.power-number} 59 | 60 | 1. Stop the `postgresql` server 61 | 62 | ```{.bash data-prompt="$"} 63 | $ sudo systemctl stop postgresql-{{pgversion}} 64 | ``` 65 | 66 | 2. Remove community packages 67 | 68 | ```{.bash data-prompt="$"} 69 | $ sudo yum remove postgresql 70 | ``` 71 | 72 | 3. [Install percona-release :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html) 73 | 4. Enable the repository 74 | 75 | ```{.bash data-prompt="$"} 76 | $ sudo percona-release setup ppg{{pgversion}} 77 | ``` 78 | 79 | 5. [Install Percona Distribution for PostgreSQL packages](yum.md) 80 | 6. (Optional) Restore the data from the backup. 81 | 7. Start the `postgresql` service 82 | 83 | ```{.bash data-prompt="$"} 84 | $ sudo systemctl start postgresql-{{pgversion}} 85 | ``` 86 | 87 | 88 | ## Migrate on a different server 89 | 90 | In this scenario, we will refer to the server with PostgreSQL Community as the "source" and to the server with Percona Distribution for PostgreSQL as the "target". 91 | 92 | To migrate from PostgreSQL Community to Percona Distribution for PostgreSQL on a different server, do the following: 93 | 94 | **On the source server**: 95 | {.power-number} 96 | 97 | 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. 98 | 2. Stop the `postgresql` service 99 | 100 | === ":material-debian: On Debian and Ubuntu" 101 | 102 | ```{.bash data-prompt="$"} 103 | $ sudo systemctl stop postgresql.service 104 | ``` 105 | 106 | === ":material-redhat: On RHEL and derivatives" 107 | 108 | ```{.bash data-prompt="$"} 109 | $ sudo systemctl stop postgresql-{{pgversion}} 110 | ``` 111 | 112 | 3. Optionally, remove PostgreSQL Community packages 113 | 114 | **On the target server**: 115 | {.power-number} 116 | 117 | 1. [Install percona-release :octicons-link-external-16:](https://docs.percona.com/percona-software-repositories/installing.html) 118 | 2. Enable the repository 119 | 120 | ```{.bash data-prompt="$"} 121 | $ sudo percona-release setup ppg{{pgversion}} 122 | ``` 123 | 124 | 3. [Install Percona Distribution for PostgreSQL packages](installing.md) on the target server. 125 | 4. Restore the data from the backup 126 | 5. Start `postgresql` service 127 | 128 | === ":material-debian: On Debian and Ubuntu" 129 | 130 | ```{.bash data-prompt="$"} 131 | $ sudo systemctl start postgresql.service 132 | ``` 133 | 134 | === ":material-redhat: On RHEL and derivatives" 135 | 136 | ```{.bash data-prompt="$"} 137 | $ sudo systemctl start postgresql-{{pgversion}} 138 | ``` -------------------------------------------------------------------------------- /docs/minor-upgrade.md: -------------------------------------------------------------------------------- 1 | # Minor Upgrade of Percona Distribution for PostgreSQL 2 | 3 | Minor releases of PostgreSQL include bug fixes and feature enhancements. We recommend that you keep your Percona Distribution for PostgreSQL updated to the latest minor version. 4 | 5 | Though minor upgrades do not change the behavior, we recommend you to back up your data first, in order to be on the safe side. 6 | 7 | Minor upgrade of Percona Distribution for PostgreSQL includes the following steps: 8 | 9 | 10 | 1. Stop the `postgresql` cluster 11 | 12 | 2. Update `percona-release` 13 | 3. Install new version packages 14 | 15 | 4. Restart the `postgresql` cluster. 16 | 17 | !!! note 18 | 19 | These steps apply if you installed Percona Distribution for PostgreSQL from the Major Release repository. In this case, you are always upgraded to the latest available release. 20 | 21 | If you installed Percona Distribution for PostgreSQL from the Minor Release repository, you will need to enable a new version repository to upgrade. 22 | 23 | For more information about Percona repositories, refer to [Installing Percona Distribution for PostgreSQL](installing.md). 24 | 25 | ## Before you start 26 | 27 | 1. [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. 28 | 29 | 2. Starting with version 17.2.1, `pg_tde` is part of the Percona Server for PostgreSQL package. If you installed `pg_tde` from its dedicated package, do the following to avoid conflicts during the upgrade: 30 | 31 | * Drop the extension using the `DROP EXTENSION` with `CASCADE` command. 32 | 33 | :material-alert: Warning: The use of the `CASCADE` parameter deletes all tables that were created in the database with `pg_tde` enabled and also all dependencies upon the encrypted table (e.g. foreign keys in a non-encrypted table used in the encrypted one). 34 | 35 | ```sql 36 | DROP EXTENSION pg_tde CASCADE 37 | ``` 38 | 39 | * Uninstall the `percona-postgresql-17-pg-tde` package for Debian/Ubuntu or the `percona-pg_tde_17` package for RHEL and derivatives. 40 | 41 | ## Procedure 42 | 43 | Run **all** commands as root or via **sudo**: 44 | {.power-number} 45 | 46 | 1. Stop the `postgresql` service. 47 | 48 | 49 | === ":material-debian: On Debian / Ubuntu" 50 | 51 | ```{.bash data-prompt="$"} 52 | $ sudo systemctl stop postgresql.service 53 | ``` 54 | 55 | 56 | === ":material-redhat: On Red Hat Enterprise Linux / derivatives" 57 | 58 | ```{.bash data-prompt="$"} 59 | $ sudo systemctl stop postgresql-16 60 | ``` 61 | 62 | 2. [Update `percona-release` to the latest version](https://docs.percona.com/percona-software-repositories/updating.html). 63 | 64 | 3. Install new version packages. See [Installing Percona Distribution for PostgreSQL](installing.md). 65 | 66 | 67 | 4. Restart the `postgresql` service. 68 | 69 | 70 | === ":material-debian: On Debian / Ubuntu" 71 | 72 | ```{.bash data-prompt="$"} 73 | $ sudo systemctl start postgresql.service 74 | ``` 75 | 76 | 77 | === ":material-redhat: On Red Hat Enterprise Linux / derivatives" 78 | 79 | ```{.bash data-prompt="$"} 80 | $ sudo systemctl start postgresql-16 81 | ``` 82 | 83 | 84 | If you wish to upgrade Percona Distribution for PostgreSQL to the major version, refer to [Upgrading Percona Distribution for PostgreSQL from 16 to 17](major-upgrade.md). 85 | -------------------------------------------------------------------------------- /docs/percona-ext.md: -------------------------------------------------------------------------------- 1 | # Percona-authored extensions 2 | 3 |
    4 |
    5 | 6 | ### :octicons-graph-16: pg_stat_monitor 7 | 8 | A query performance monitoring tool for PostgreSQL that brings more insight and details around query performance, planning statistics and metadata. It improves observability, enabling users to debug and tune query performance with precision. 9 | 10 | [pg_stat_monitor documentation :octicons-link-external-16:](https://docs.percona.com/pg-stat-monitor/index.html){.md-button} 11 |
    12 | 13 |
    14 | 15 | ### :material-file-key-outline: pg_tde 16 | 17 | An open-source extension designed to enhance PostgreSQL’s security by encrypting data files on disk. The encryption is transparent for users allowing them to access and manipulate the data and not to worry about the encryption process. 18 | 19 | 20 | [pg_tde documentation :octicons-link-external-16:](https://docs.percona.com/pg-tde/index.html){.md-button} 21 | 22 | 23 |
    24 |
    25 | -------------------------------------------------------------------------------- /docs/postgresql-server.md: -------------------------------------------------------------------------------- 1 | # Percona Server for PostgreSQL 2 | 3 | Percona Server for PostgreSQL is a binary-compatible, open source drop-in replacement for PostgreSQL 17. It introduces additional features to the upstream server, including: 4 | 5 | * Storage Manager (SMGR) API Exposure: Allows PostgreSQL extensions to integrate custom storage managers. This change was inspired by the [patchset](https://www.postgresql.org/message-id/flat/CAJ7c6TOqqrzjYsU6LgDkcJ0yVgzdkx2juJjgAjzP2jPOpZ1qUA%40mail.gmail.com#8e68cfc57fcac14c8e24b00b41e61baf) introduced to the community. 6 | * WAL Read/Write API Exposure to hook into WAL read and write functions. 7 | 8 | These modifications have no impact on existing use cases and operation of PostgreSQL. They are required to enable additional encryption capabilities such as index-level and Write-Ahead Logging (WAL) encryption of indexes through the [`pg_tde` :octicons-link-external-16:](https://docs.percona.com/pg-tde/index.html) extension. These encryption features provided by the `pg_tde` are still under active development and are planned for future releases. 9 | 10 | Percona Server and upstream PostgreSQL function identically enabling you to migrate from one to another. 11 | 12 | [Get started :material-arrow-right:](installing.md){.md-button} -------------------------------------------------------------------------------- /docs/release-notes-v17.2.md: -------------------------------------------------------------------------------- 1 | # Percona Distribution for PostgreSQL 17.2.1 ({{date.17_2}}) 2 | 3 | --8<-- "release-notes-intro.md" 4 | 5 | This release of Percona Distribution for PostgreSQL is based on Percona Server for PostgreSQL 17.2.1 - a binary compatible, open source drop in replacement of [PostgreSQL Community 17.2](https://www.postgresql.org/docs/17/release-17-2.html). 6 | 7 | ## Release Highlights 8 | 9 | * This release includes fixes for [CVE-2024-10978](https://www.postgresql.org/support/security/CVE-2024-10978/) and for certain PostgreSQL extensions that break because they depend on the modified Application Binary Interface (ABI). These regressions were introduced in PostgreSQL 17.1, 16.5, 15.9, 14.14, 13.17, and 12.21. For this reason, the release of Percona Distribution for PostgreSQL 17.1.1 has been skipped. 10 | * Percona Distribution for PostgreSQL includes [`pgvector` :octicons-link-external-16:](https://github.com/pgvector/pgvector) - an open source extension that enables you to use PostgreSQL as a vector database. It brings vector data type and vector operations (mainly similarity search) to PostgreSQL. You can install `pgvector` from repositories, tarballs, and it is also available as a Docker image. 11 | * The new version of `pg_tde` extension features index encryption and the support of storing encryption keys in KMIP-compatible servers. These feature come with the Beta version of the `tde_heap` access method. Learn more in the [pg_tde release notes :octicons-link-external-16:](https://docs.percona.com/pg-tde/release-notes/beta2.html) 12 | * The `pg_tde` extension itself is now a part of the Percona Server for PostgreSQL server package and a Docker image. If you installed the extension before, from its individual package, uninstall it first to avoid conflicts during the upgrade. See the [Minor Upgrade of Percona Distribution for PostgreSQL](minor-upgrade.md#before-you-start) for details. 13 | For how to run `pg_tde` in Docker, check the [Enable encryption](docker.md#enable-encryption) section in the documentation. 14 | * Percona Distribution for PostgreSQL now statically links `llvmjit.so` library for Red Hat Enterprise Linux 8 and 9 and compatible derivatives. This resolves the conflict between the LLVM version required by Percona Distribution for PostgreSQL and the one supplied with the operating system. This also enables you to use the LLVM modules supplied with the operating system for other software you require. 15 | * Percona Monitoring and Management (PMM) 2.43.2 is now compatible with `pg_stat_monitor` 2.1.0 to monitor PostgreSQL 17. 16 | 17 | ------------------------------------------------------------------------------ 18 | 19 | 20 | The following is the list of extensions available in Percona Distribution for PostgreSQL. 21 | 22 | | Extension | Version | Description | 23 | | ------------------- | -------------- | ---------------------------- | 24 | | [etcd](https://etcd.io/)| 3.5.16 | A distributed, reliable key-value store for setting up high available Patroni clusters | 25 | |[HAProxy :octicons-link-external-16:](http://www.haproxy.org/) | 2.8.11 | a high-availability and load-balancing solution | 26 | | [Patroni :octicons-link-external-16:](https://patroni.readthedocs.io/en/latest/) | 4.0.3 | a HA (High Availability) solution for PostgreSQL | 27 | | [PgAudit :octicons-link-external-16:](https://www.pgaudit.org/) | 17.0 | provides detailed session or object audit logging via the standard logging facility provided by PostgreSQL | 28 | | [pgAudit set_user :octicons-link-external-16:](https://github.com/pgaudit/set_user)| 4.1.0 | 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.| 29 | | [pgBackRest :octicons-link-external-16:](https://pgbackrest.org/) | 2.54.0 | a backup and restore solution for PostgreSQL | 30 | |[pgBadger :octicons-link-external-16:](https://github.com/darold/pgbadger) | 12.4 | a fast PostgreSQL Log Analyzer.| 31 | |[PgBouncer :octicons-link-external-16:](https://www.pgbouncer.org/) |1.23.1 | a lightweight connection pooler for PostgreSQL| 32 | | [pg_gather :octicons-link-external-16:](https://github.com/jobinau/pg_gather)| v28 | an SQL script for running the diagnostics of the health of PostgreSQL cluster | 33 | | [pgpool2 :octicons-link-external-16:](https://git.postgresql.org/gitweb/?p=pgpool2.git;a=summary) | 4.5.4 | a middleware between PostgreSQL server and client for high availability, connection pooling and load balancing.| 34 | | [pg_repack :octicons-link-external-16:](https://github.com/reorg/pg_repack) | 1.5.1 | rebuilds PostgreSQL database objects | 35 | | [pg_stat_monitor :octicons-link-external-16:](https://github.com/percona/pg_stat_monitor)|{{pgsmversion}} | collects and aggregates statistics for PostgreSQL and provides histogram information.| 36 | |[pgvector :octicons-link-external-16:](https://github.com/pgvector/pgvector)| v0.8.0 | A vector similarity search for PostgreSQL| 37 | | [PostGIS :octicons-link-external-16:](https://github.com/postgis/postgis) | 3.3.7 | a spatial extension for PostgreSQL.| 38 | | [PostgreSQL Common :octicons-link-external-16:](https://salsa.debian.org/postgresql/postgresql-common)| 265 | 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.| 39 | |[wal2json :octicons-link-external-16:](https://github.com/eulerto/wal2json) |2.6 | a PostgreSQL logical decoding JSON output plugin| 40 | 41 | For Red Hat Enterprise Linux 8 and 9 and compatible derivatives, Percona Distribution for PostgreSQL also includes the following packages: 42 | 43 | * `llvm` 17.0.6 packages. This fixes compatibility issues with LLVM from upstream. 44 | * supplemental `python3-etcd` 0.4.5 packages, which can be used for setting up Patroni clusters. 45 | 46 | Percona Distribution for PostgreSQL is also shipped with the [libpq](https://www.postgresql.org/docs/17/libpq.html) library. It contains "a set of 47 | library functions that allow client programs to pass queries to the PostgreSQL 48 | backend server and to receive the results of these queries." -------------------------------------------------------------------------------- /docs/release-notes-v17.4.md: -------------------------------------------------------------------------------- 1 | # Percona Distribution for PostgreSQL 17.4.1 ({{date.17_4}}) 2 | 3 | --8<-- "release-notes-intro.md" 4 | 5 | This release of Percona Distribution for PostgreSQL is based on Percona Server for PostgreSQL 17.4.1 - a binary compatible, open source drop in replacement of [PostgreSQL Community 17.4](https://www.postgresql.org/docs/17/release-17-4.html). 6 | 7 | ## Release Highlights 8 | 9 | This release fixes [CVE-2025-1094](https://www.postgresql.org/support/security/CVE-2025-1094/), which closed a vulnerability in the `libpq` PostgreSQL client library but introduced a regression related to string handling for non-null terminated strings. The error would be visible based on how a PostgreSQL client implemented this behavior. This regression affects versions 17.3, 16.7, 15.11, 14.16, and 13.19. For this reason, version 17.3 was skipped. 10 | 11 | ### A new version of `pg_tde` 12 | 13 | Percona Distribution for PostgreSQL includes the Release Candidate of `pg_tde` extension that brings in Transparent Data Encryption. This version of `pg_tde` provides a bunch of improvements, among which is the redesigned WAL encryption, simplified configuration for single-tenant environments, the ability to change key provider configuration offline, and more. Learn about these features in the [`pg_tde` release notes :octicons-link-external-16:](https://docs.percona.com/pg-tde/release-notes/rc.html). 14 | 15 | ### Improved security and user experience for Docker images 16 | 17 | * Percona Distribution for PostgreSQL Docker image is now based on Universal Base Image (UBI) version 9, which includes the latest security fixes. This makes the image compliant with the Red Hat certification and ensures the seamless work of containers on Red Hat OpenShift Container Platform. 18 | 19 | * You no longer have to specify the `{{dockertag}}-multi` tag when you run Percona Distribution for PostgreSQL in Docker. Instead, use the `percona/percona-distribution-postgresql:{{dockertag}}`. Docker automatically identifies the architecture of your operating system and pulls the corresponding image. Refer to [Run in Docker](docker.md) for how to get started. 20 | 21 | ### PostGIS is included into tarballs 22 | 23 | We have extended Percona Distribution for PostgreSQL tarballs with PostGIS - an open-source extension to handle spacial data. This way you can install and run PostgreSQL as a geospatial database on hosts without a direct access to the Internet. Learn more about [installing from tarballs](tarball.md) and [Spacial data manipulation](solutions/postgis.md). 24 | 25 | ### Deprecation of meta packages 26 | 27 | [Meta-packages for Percona Distribution for PostgreSQL](repo-overview.md#repository-contents) are deprecated and will be removed in future releases. 28 | 29 | ## Supplied third-party extensions 30 | 31 | Review each extension’s release notes for What’s new, improvements, or bug fixes. The following is the list of extensions available in Percona Distribution for PostgreSQL. 32 | 33 | | Extension | Version | Description | 34 | |--------------------------------------------------------------------------------------|-----------|----------------------------------------------------------------------------------------------------------------------| 35 | | [etcd :octicons-link-external-16:](https://etcd.io/) | 3.5.18 | A distributed, reliable key-value store for setting up high available Patroni clusters | 36 | | [HAProxy :octicons-link-external-16:](http://www.haproxy.org/) | 2.8.13 | A high-availability and load-balancing solution | 37 | | [Patroni :octicons-link-external-16:](https://patroni.readthedocs.io/en/latest/) | 4.0.5 | A HA (High Availability) solution for PostgreSQL | 38 | | [PgAudit :octicons-link-external-16:](https://www.pgaudit.org/) | 17.1 | Provides detailed session or object audit logging via the standard logging facility provided by PostgreSQL | 39 | | [pgAudit set_user :octicons-link-external-16:](https://github.com/pgaudit/set_user) | 4.1.0 | Provides an additional layer of logging and control when unprivileged users must escalate roles for maintenance. | 40 | | [pgBackRest :octicons-link-external-16:](https://pgbackrest.org/) | 2.54.2 | A backup and restore solution for PostgreSQL | 41 | | [pgBadger :octicons-link-external-16:](https://github.com/darold/pgbadger) | 13.1 | A fast PostgreSQL Log Analyzer | 42 | | [PgBouncer :octicons-link-external-16:](https://www.pgbouncer.org/) | 1.24.0 | A lightweight connection pooler for PostgreSQL | 43 | | [pg_gather :octicons-link-external-16:](https://github.com/jobinau/pg_gather) | v29 | An SQL script for running the diagnostics of the health of a PostgreSQL cluster | 44 | | [pgpool2 :octicons-link-external-16:](https://git.postgresql.org/gitweb/?p=pgpool2.git;a=summary) | 4.5.5 | A middleware between PostgreSQL server and client for high availability, connection pooling, and load balancing | 45 | | [pg_repack :octicons-link-external-16:](https://github.com/reorg/pg_repack) | 1.5.2 | Rebuilds PostgreSQL database objects | 46 | | [pg_stat_monitor :octicons-link-external-16:](https://github.com/percona/pg_stat_monitor) | {{pgsmversion}} | Collects and aggregates statistics for PostgreSQL and provides histogram information | 47 | | [pgvector :octicons-link-external-16:](https://github.com/pgvector/pgvector) | v0.8.0 | A vector similarity search for PostgreSQL | 48 | | [PostGIS :octicons-link-external-16:](https://github.com/postgis/postgis) | 3.3.8 | A spatial extension for PostgreSQL | 49 | | [PostgreSQL Common :octicons-link-external-16:](https://salsa.debian.org/postgresql/postgresql-common) | 267 | PostgreSQL database-cluster manager. Supports multiple PostgreSQL versions and clusters simultaneously | 50 | | [wal2json :octicons-link-external-16:](https://github.com/eulerto/wal2json) | 2.6 | A PostgreSQL logical decoding JSON output plugin | 51 | 52 | 53 | For Red Hat Enterprise Linux 8 and compatible derivatives, Percona Distribution for PostgreSQL also includes the supplemental `python3-etcd` 0.4.5 packages, which are used for setting up Patroni clusters. 54 | 55 | Percona Distribution for PostgreSQL is also shipped with the [libpq](https://www.postgresql.org/docs/17/libpq.html) library. It contains "a set of 56 | library functions that allow client programs to pass queries to the PostgreSQL 57 | backend server and to receive the results of these queries." -------------------------------------------------------------------------------- /docs/release-notes-v17.5.md: -------------------------------------------------------------------------------- 1 | # Percona Distribution for PostgreSQL 17.5.1 ({{date.17_5}}) 2 | 3 | --8<-- "release-notes-intro.md" 4 | 5 | This release of Percona Distribution for PostgreSQL is based on Percona Server for PostgreSQL 17.5.1 - a binary compatible, open source drop in replacement of [PostgreSQL Community 17.5](https://www.postgresql.org/docs/17/release-17-5.html). 6 | 7 | ## Release Highlights 8 | 9 | ### A new version of `pg_tde` 10 | 11 | Percona Distribution for PostgreSQL includes the Release Candidate 2 (RC2) of `pg_tde` extension that brings in Transparent Data Encryption. This version of `pg_tde` provides a bunch of improvements, among which is WAL encryption now supporting Vault, automatic WAL internal key generation at server startup, new visibility and verification functions for default principal keys, and more. Learn about these features in the [`pg_tde` release notes :octicons-link-external-16:](https://docs.percona.com/pg-tde/release-notes/rc2.html). 12 | 13 | ### Updated Major upgrade topic in documentation 14 | 15 | The [Upgrading Percona Distribution for PostgreSQL from 16 to 17](major-upgrade.md) guide has been updated with revised steps for the [On Debian and Ubuntu using `apt`](major-upgrade.md/#on-debian-and-ubuntu-using-apt) section, improving clarity and reliability of the upgrade process. 16 | 17 | | Extension | Version | Description | 18 | |--------------------------------------------------------------------------------------|-----------|----------------------------------------------------------------------------------------------------------------------| 19 | | [etcd :octicons-link-external-16:](https://etcd.io/) | 3.5.21 | A distributed, reliable key-value store for setting up high available Patroni clusters | 20 | | [HAProxy :octicons-link-external-16:](http://www.haproxy.org/) | 2.8.15 | A high-availability and load-balancing solution | 21 | | [Patroni :octicons-link-external-16:](https://patroni.readthedocs.io/en/latest/) | 4.0.5 | A HA (High Availability) solution for PostgreSQL | 22 | | [PgAudit :octicons-link-external-16:](https://www.pgaudit.org/) | 17.1 | Provides detailed session or object audit logging via the standard logging facility provided by PostgreSQL | 23 | | [pgAudit set_user :octicons-link-external-16:](https://github.com/pgaudit/set_user) | 4.1.0 | Provides an additional layer of logging and control when unprivileged users must escalate roles for maintenance. | 24 | | [pgBackRest :octicons-link-external-16:](https://pgbackrest.org/) | 2.55.0 | A backup and restore solution for PostgreSQL | 25 | | [pgBadger :octicons-link-external-16:](https://github.com/darold/pgbadger) | 13.1 | A fast PostgreSQL Log Analyzer | 26 | | [PgBouncer :octicons-link-external-16:](https://www.pgbouncer.org/) | 1.24.1 | A lightweight connection pooler for PostgreSQL | 27 | | [pg_gather :octicons-link-external-16:](https://github.com/jobinau/pg_gather) | v30 | An SQL script for running the diagnostics of the health of a PostgreSQL cluster | 28 | | [pgpool2 :octicons-link-external-16:](https://git.postgresql.org/gitweb/?p=pgpool2.git;a=summary) | 4.6.0 | A middleware between PostgreSQL server and client for high availability, connection pooling, and load balancing | 29 | | [pg_repack :octicons-link-external-16:](https://github.com/reorg/pg_repack) | 1.5.2 | Rebuilds PostgreSQL database objects | 30 | | [pgvector :octicons-link-external-16:](https://github.com/pgvector/pgvector) | v0.8.0 | A vector similarity search for PostgreSQL | 31 | | [PostGIS :octicons-link-external-16:](https://github.com/postgis/postgis) | 3.3.8 | A spatial extension for PostgreSQL | 32 | | [PostgreSQL Common :octicons-link-external-16:](https://salsa.debian.org/postgresql/postgresql-common) | 277 | PostgreSQL database-cluster manager. Supports multiple PostgreSQL versions and clusters simultaneously | 33 | | [wal2json :octicons-link-external-16:](https://github.com/eulerto/wal2json) | 2.6 | A PostgreSQL logical decoding JSON output plugin | 34 | 35 | For Red Hat Enterprise Linux 8 and compatible derivatives, Percona Distribution for PostgreSQL also includes the supplemental `python3-etcd` 0.4.5 packages, which are used for setting up Patroni clusters. 36 | 37 | Percona Distribution for PostgreSQL is also shipped with the [libpq](https://www.postgresql.org/docs/17/libpq.html) library. It contains "a set of 38 | library functions that allow client programs to pass queries to the PostgreSQL 39 | backend server and to receive the results of these queries." 40 | -------------------------------------------------------------------------------- /docs/release-notes.md: -------------------------------------------------------------------------------- 1 | # Percona Distribution for PostgreSQL release notes 2 | 3 | * [Percona Distribution for PostgreSQL 17.5.1](release-notes-v17.5.md) ({{date.17_5}}) 4 | * [Percona Distribution for PostgreSQL 17.4.1](release-notes-v17.4.md) ({{date.17_4}}) 5 | * [Percona Distribution for PostgreSQL 17.2.1](release-notes-v17.2.md) ({{date.17_2}}) 6 | * [Percona Distribution for PostgreSQL 17.0.1](release-notes-v17.0.md) ({{date.17_0}}) 7 | -------------------------------------------------------------------------------- /docs/repo-overview.md: -------------------------------------------------------------------------------- 1 | # Repositories overview 2 | 3 | Percona provides two repositories for Percona Distribution for PostgreSQL. 4 | 5 | | Major release repository | Minor release repository | 6 | | ------------------------ | ------------------------ | 7 | | *Major Release repository* (`ppg-{{pgversion}}`) it includes the latest version packages. Whenever a package is updated, the package manager of your operating system detects that and prompts you to update. As long as you update all Distribution packages at the same time, you can ensure that the packages you’re using have been tested and verified by Percona.

    We recommend installing Percona Distribution for PostgreSQL from the *Major Release repository*| *Minor Release repository* includes a particular minor release of the database and all of the packages that were tested and verified to work with that minor release (e.g. `ppg-{{dockertag}}`). You may choose to install Percona Distribution for PostgreSQL from the Minor Release repository if you have decided to standardize on a particular release which has passed rigorous testing procedures and which has been verified to work with your applications. This allows you to deploy to a new host and ensure that you’ll be using the same version of all the Distribution packages, even if newer releases exist in other repositories.

    The disadvantage of using a Minor Release repository is that you are locked in this particular release. When potentially critical fixes are released in a later minor version of the database, you will not be prompted for an upgrade by the package manager of your operating system. You would need to change the configured repository in order to install the upgrade.| 8 | 9 | ## Repository contents 10 | 11 | Percona Distribution for PostgreSQL provides individual packages for its components. It also includes two meta-packages: `percona-ppg-server` and `percona-ppg-server-ha`. 12 | 13 | Using a meta-package, you can install all components it contains in one go. 14 | 15 | ### `percona-ppg-server` 16 | 17 | === "Package name on Debian/Ubuntu" 18 | 19 | `percona-ppg-server-{{pgversion}}` 20 | 21 | === "Package name on RHEL/derivatives" 22 | 23 | `percona-ppg-server{{pgversion}}` 24 | 25 | The `percona-ppg-server` meta-package installs the PostgreSQL server with the following packages: 26 | 27 | | Package contents | Description | 28 | | ---------------- | --------------------------------------- | 29 | | `percona-postgresql{{pgversion}}-server` | The PostgreSQL server package. | 30 | | `percona-postgresql-common` | 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.| 31 | | `percona-postgresql{{pgversion}}-contrib` | A collection of additional PostgreSQLcontrib extensions | 32 | | `percona-pg-stat-monitor{{pgversion}}` | A Query Performance Monitoring tool for PostgreSQL. | 33 | | `percona-pgaudit{{pgversion}}` | Provides detailed session or object audit logging via the standard PostgreSQL logging facility. | 34 | | `percona-pg_repack{{pgversion}}`| rebuilds PostgreSQL database objects.| 35 | | `percona-wal2json{{pgversion}}` | a PostgreSQL logical decoding JSON output plugin.| 36 | 37 | 38 | ### `percona-ppg-server-ha` 39 | 40 | === "Package name on Debian/Ubuntu" 41 | 42 | `percona-ppg-server-ha-{{pgversion}}` 43 | 44 | === "Package name on RHEL/derivatives" 45 | 46 | `percona-ppg-server-{{pgversion}}` 47 | 48 | The `percona-ppg-server-ha` meta-package installs high-availability components that are recommended by Percona: 49 | 50 | | Package contents | Description | 51 | | ---------------- | --------------------------------------- | 52 | | `percona-patroni`| A high-availability solution for PostgreSQL. | 53 | | `percona-haproxy`| A high-availability and load-balancing solution | 54 | | `etcd` | A consistent, distributed key-value store | 55 | | `python3-python-etcd` | A Python client for etcd | 56 | -------------------------------------------------------------------------------- /docs/solutions.md: -------------------------------------------------------------------------------- 1 | # Percona Distribution for PostgreSQL solutions 2 | 3 | Find the right solution to help you achieve your organization's goals. 4 | 5 |
    6 | 7 | ### :material-clock-check-outline: High availability 8 | 9 | Check out how you can ensure continuous access to your database. 10 | 11 | [High availability :material-arrow-right:](solutions/high-availability.md){.md-button} 12 | 13 |
    14 | 15 | ### :octicons-globe-24: Spatial data handling 16 | 17 | Dealing with spatial data? Learn how you can store and manipulate it. 18 | 19 | [Spatial data handling :material-arrow-right:](solutions/postgis.md){.md-button} 20 | 21 |
    22 | 23 | ### :material-backup-restore: Backup and disaster recovery 24 | 25 | Protect your database against accidental or malicious data loss or data corruption. 26 | 27 | [Backup and disaster recovery :material-arrow-right:](solutions/backup-recovery.md){.md-button} 28 | 29 |
    30 |
    -------------------------------------------------------------------------------- /docs/solutions/backup-recovery.md: -------------------------------------------------------------------------------- 1 | # Backup and disaster recovery in Percona Distribution for PostgreSQL 2 | 3 | !!! summary 4 | 5 | - Overview 6 | - Architecture 7 | - [Deployment](dr-pgbackrest-setup.md) 8 | - [Testing](dr-pgbackrest-setup.md#testing-backup-and-restore-with-pgbackrest) 9 | 10 | ## Overview 11 | 12 | A Disaster Recovery (DR) solution ensures that a system can be quickly restored to a normal operational state if something unexpected happens. When operating a database, you would back up the data as frequently as possible and have a mechanism to restore that data when needed. Disaster Recovery is often mistaken for high availability (HA), but they are two different concepts altogether: 13 | 14 | - High availability ensures guaranteed service levels at all times. This solution involves configuring one or more standby systems to an active database, and the ability to switch seamlessly to that standby when the primary database becomes unavailable, for example, during a power outage or a server crash. To learn more about high-availability solutions with Percona Distribution for PostgreSQL, refer to [High Availability in PostgreSQL with Patroni](high-availability.md). 15 | - Disaster Recovery protects the database instance against accidental or malicious data loss or data corruption. Disaster recovery can be achieved by using either the options provided by PostgreSQL, or external extensions. 16 | 17 |
    18 | 19 | ??? "**PostgreSQL disaster recovery options**" 20 | 21 |
    22 | PostgreSQL offers multiple options for setting up database disaster recovery. 23 | 24 | - **[pg_dump :octicons-link-external-16:](https://www.postgresql.org/docs/{{pgversion}}/app-pgdump.html) or the [pg_dumpall :octicons-link-external-16:](https://www.postgresql.org/docs/{{pgversion}}/app-pg-dumpall.html) utilities** 25 | 26 | 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/{{pgversion}}/app-pgrestore.html) command. 27 | 28 | | Advantages | Disadvantages | 29 | | ------------ | --------------- | 30 | | Easy to use | 1. Backup of only one database at a time.
    2. No incremental backups.
    3. No point-in-time recovery since the backup is a snapshot in time.
    4. Performance degradation when the database size is large.| 31 | 32 | - **File-based backup and restore** 33 | 34 | This method involves backing up the PostgreSQL data directory to a different location, and restoring it when needed. 35 | 36 | | Advantages | Disadvantages | 37 | | ------------ | --------------- | 38 | | 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.| 39 | 40 | - **PostgreSQL [pg_basebackup :octicons-link-external-16:](https://www.postgresql.org/docs/{{pgversion}}/app-pgbasebackup.html)** 41 | 42 | 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. 43 | 44 | | Advantages | Disadvantages | 45 | | ------------ | --------------- | 46 | | 1. Supports backups when the database is running.
    2. Supports point-in-time recovery | 1. No incremental backups.
    2. No backup of individual databases or tables.| 47 |
    48 | 49 | To achieve a production grade PostgreSQL disaster recovery solution, you need something that can take full or incremental database backups from a running instance, and restore from those backups at any point in time. Percona Distribution for PostgreSQL is supplied with [pgBackRest](#pgbackrest): a reliable, open-source backup and recovery solution for PostgreSQL. 50 | 51 | This document focuses on the Disaster recovery solution in Percona Distribution for PostgreSQL. The [Deploying backup and disaster recovery solution in Percona Distribution for PostgreSQL](dr-pgbackrest-setup.md) tutorial provides guidelines of how to set up and test this solution. 52 | 53 | ### pgBackRest 54 | 55 | [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: 56 | 57 | * full backup - a complete copy of your entire data set. 58 | * 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. 59 | * incremental backup - only backs up the files that have changed since the last full or differential backup, resulting in a quick backup time. To restore to a point in time, however, you will need to restore each incremental backup in the order they were taken. 60 | 61 | When it comes to restoring, `pgBackRest` can do a full or a delta restore. A _full_ restore needs an empty PostgreSQL target directory. A _delta_ restore is intelligent enough to recognize already-existing files in the PostgreSQL data directory, and update only the ones the backup contains. 62 | 63 | `pgBackRest` supports remote repository hosting and can even use cloud-based services like AWS S3, Google Cloud Services Cloud Storage, Azure Blob Storage for saving backup files. It supports parallel backup through multi-core processing and compression. By default, backup integrity is verified through checksums, and saved files can be encrypted for enhanced security. 64 | 65 | `pgBackRest` can restore a database to a specific point in time in the past. This is the case where a database is not inaccessible but perhaps contains corrupted data. Using the point-in-time recovery, a database administrator can restore the database to the last known good state. 66 | 67 | Finally, `pgBackRest` also supports restoring PostgreSQL databases to a different PostgreSQL instance or a separate data directory. 68 | 69 | ## Setup overview 70 | 71 | This section describes the architecture of the backup and disaster recovery solution. For the configuration steps, refer to the [Deploying backup and disaster recovery solution in Percona Distribution for PostgreSQL](dr-pgbackrest-setup.md). 72 | 73 | ### System architecture 74 | 75 | As the configuration example, we will use a three server architecture where `pgBackRest` resides on a dedicated remote host. The servers communicate with each other via passwordless SSH. 76 | 77 | !!! important 78 | 79 | 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). 80 | 81 | The following diagram illustrates the architecture layout: 82 | 83 | ![pgBackRest implementation architecture](../_images/diagrams/DR-architecture.png) 84 | 85 | #### Components: 86 | 87 | The architecture consists of three server instances: 88 | 89 | - `pg-primary` hosts the primary PostgreSQL server. Note that "primary" here means the main database instance and does not refer to the primary node of a PostgreSQL replication cluster or a HA setup. 90 | - `pg-repo` is the remote backup repository and hosts `pgBackRest`. It's important to host the backup repository on a physically separate instance, to be accessed when the target goes down. 91 | - `pg-secondary` is the _secondary_ PostgreSQL node. Don't confuse it with a hot standby. "Secondary" in this context means a PostgreSQL instance that's idle. We will restore the database backup to this instance when the primary PostgreSQL instance goes down. 92 | 93 | !!! note 94 | 95 | For simplicity, we use a single-node PostgreSQL instance as the primary database server. In a production scenario, you will use some form of high-availability solution to protect the primary instance. When you are using a high-availability setup, we recommend configuring `pgBackRest` to back up the hot standby server so the primary node is not unnecessarily loaded. 96 | 97 | ### Deployment 98 | 99 | Refer to the [Deploying backup and disaster recovery solution in Percona Distribution for PostgreSQL](dr-pgbackrest-setup.md) tutorial. -------------------------------------------------------------------------------- /docs/solutions/high-availability.md: -------------------------------------------------------------------------------- 1 | # High Availability in PostgreSQL with Patroni 2 | 3 | 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. 4 | 5 | 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. 6 | 7 | ??? admonition "High availability methods" 8 | 9 | There are several native methods for achieving high availability with PostgreSQL: 10 | 11 | - shared disk failover, 12 | - file system replication, 13 | - trigger-based replication, 14 | - statement-based replication, 15 | - logical replication, 16 | - Write-Ahead Log (WAL) shipping, and 17 | - [streaming replication](#streaming-replication) 18 | 19 | 20 | ## Streaming replication 21 | 22 | Streaming replication is part of Write-Ahead Log shipping, where changes to the WALs are immediately made available to standby replicas. With this approach, a standby instance is always up-to-date with changes from the primary node and can assume the role of primary in case of a failover. 23 | 24 | 25 | ### Why native streaming replication is not enough 26 | 27 | Although the native streaming replication in PostgreSQL supports failing over to the primary node, it lacks some key features expected from a truly highly-available solution. These include: 28 | 29 | 30 | * No consensus-based promotion of a “leader” node during a failover 31 | * No decent capability for monitoring cluster status 32 | * No automated way to bring back the failed primary node to the cluster 33 | * A manual or scheduled switchover is not easy to manage 34 | 35 | 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. 36 | 37 | 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. 38 | 39 | ## Patroni 40 | 41 | [Patroni :octicons-link-external-16:](https://patroni.readthedocs.io/en/latest/) is a Patroni is an open-source tool that helps to deploy, manage, and monitor highly available PostgreSQL clusters using physical streaming replication. Patroni relies on a distributed configuration store like ZooKeeper, etcd, Consul or Kubernetes to store the cluster configuration. 42 | 43 | ### Key benefits of Patroni: 44 | 45 | * Continuous monitoring and automatic failover 46 | * Manual/scheduled switchover with a single command 47 | * Built-in automation for bringing back a failed node to cluster again. 48 | * REST APIs for entire cluster configuration and further tooling. 49 | * Provides infrastructure for transparent application failover 50 | * Distributed consensus for every action and configuration. 51 | * Integration with Linux watchdog for avoiding split-brain syndrome. 52 | 53 | ## etcd 54 | 55 | As stated before, Patroni uses a distributed configuration store to store the cluster configuration, health and status.The most popular implementation of the distributed configuration store is etcd due to its simplicity, consistency and reliability. Etcd not only stores the cluster data, it also handles the election of a new primary node (a leader in ETCD terminology). 56 | 57 | etcd is deployed as a cluster for fault-tolerance. An etcd cluster needs a majority of nodes, a quorum, to agree on updates to the cluster state. 58 | 59 | The recommended approach is to deploy an odd-sized cluster (e.g. 3, 5 or 7 nodes). The odd number of nodes ensures that there is always a majority of nodes available to make decisions and keep the cluster running smoothly. This majority is crucial for maintaining consistency and availability, even if one node fails. For a cluster with n members, the majority is (n/2)+1. 60 | 61 | To better illustrate this concept, let's take an example of clusters with 3 nodes and 4 nodes. 62 | 63 | In a 3-node cluster, if one node fails, the remaining 2 nodes still form a majority (2 out of 3), and the cluster can continue to operate. 64 | 65 | In a 4-nodes cluster, if one node fails, there are only 3 nodes left, which is not enough to form a majority (3 out of 4). The cluster stops functioning. 66 | 67 | In this solution we use a 3-nodes etcd cluster that resides on the same hosts with PostgreSQL and Patroni. Though 68 | 69 | !!! admonition "See also" 70 | 71 | - [Patroni documentation :octicons-link-external-16:](https://patroni.readthedocs.io/en/latest/SETTINGS.html#settings) 72 | 73 | - Percona Blog: 74 | 75 | - [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/) 76 | 77 | ## Architecture layout 78 | 79 | The following diagram shows the architecture of a three-node PostgreSQL cluster with a single-leader node. 80 | 81 | ![Architecture of the three-node, single primary PostgreSQL cluster](../_images/diagrams/ha-architecture-patroni.png) 82 | 83 | ### Components 84 | 85 | The components in this architecture are: 86 | 87 | - PostgreSQL nodes 88 | - Patroni - a template for configuring a highly available PostgreSQL cluster. 89 | 90 | - etcd - a Distributed Configuration store that stores the state of the PostgreSQL cluster. 91 | 92 | - HAProxy - the load balancer for the cluster and is the single point of entry to client applications. 93 | 94 | - pgBackRest - the backup and restore solution for PostgreSQL 95 | 96 | - Percona Monitoring and Management (PMM) - the solution to monitor the health of your cluster 97 | 98 | ### How components work together 99 | 100 | Each PostgreSQL instance in the cluster maintains consistency with other members through streaming replication. Each instance hosts Patroni - a cluster manager that monitors the cluster health. Patroni relies on the operational etcd cluster to store the cluster configuration and sensitive data about the cluster health there. 101 | 102 | Patroni periodically sends heartbeat requests with the cluster status to etcd. etcd writes this information to disk and sends the response back to Patroni. If the current primary fails to renew its status as leader within the specified timeout, Patroni updates the state change in etcd, which uses this information to elect the new primary and keep the cluster up and running. 103 | 104 | The connections to the cluster do not happen directly to the database nodes but are routed via a connection proxy like HAProxy. This proxy determines the active node by querying the Patroni REST API. 105 | 106 | ## Next steps 107 | 108 | [Deploy on Debian or Ubuntu](ha-setup-apt.md){.md-button} 109 | [Deploy on RHEL or derivatives](ha-setup-yum.md){.md-button} 110 | 111 | -------------------------------------------------------------------------------- /docs/solutions/postgis-deploy.md: -------------------------------------------------------------------------------- 1 | # Deploy spatial data with PostgreSQL 2 | 3 | The following document provides guidelines how to install PostGIS and how to run the basic queries. 4 | 5 | ## Considerations 6 | 7 | 1. We assume that you have the basic knowledge of spatial data, GIS (Geographical Information System) and of shapefiles. 8 | 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/). 9 | 10 | 11 | ## Install PostGIS 12 | 13 | === ":material-debian: On Debian and Ubuntu" 14 | 15 | 1. Enable Percona repository 16 | 17 | 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. 18 | 19 | ```{.bash data-prompt="$"} 20 | $ sudo percona-release setup ppg{{pgversion}} 21 | ``` 22 | 23 | 2. Install PostGIS packages 24 | 25 | ```{.bash data-prompt="$"} 26 | $ sudo apt install percona-postgis 27 | ``` 28 | 29 | 3. The command in the previous step installs the set of PostGIS extensions. To check what extensions are available, run the following query from the `psql` terminal: 30 | 31 | ```sql 32 | SELECT name, default_version,installed_version 33 | FROM pg_available_extensions WHERE name LIKE 'postgis%' or name LIKE address%'; 34 | ``` 35 | 36 | !!! note 37 | 38 | To enable the `postgis_sfcgal-3` extension on Ubuntu 18.04, you need to manually install the required dependency: 39 | 40 | ```{.bash data-prompt="$"} 41 | $ sudo apt-get install libsfcgal1 42 | ``` 43 | 44 | === ":material-redhat: On RHEL and derivatives" 45 | 46 | 1. Check the [Platform specific notes](../yum.md#for-postgis) and enable required repositories and modules for the dependencies relevant to your operating system. 47 | 48 | 2. Enable Percona repository 49 | 50 | 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. 51 | 52 | ```{.bash data-prompt="$"} 53 | $ sudo percona-release setup ppg{{pgversion}} 54 | ``` 55 | 56 | 3. Install the extension 57 | 58 | ```{.bash data-prompt="$"} 59 | $ sudo yum install percona-postgis33_{{pgversion}} percona-postgis33_{{pgversion}}-client 60 | ``` 61 | 62 | This installs the set of PostGIS extensions. To check what extensions are available, run the following query from the `psql` terminal: 63 | 64 | ```sql 65 | SELECT name, default_version,installed_version 66 | FROM pg_available_extensions WHERE name LIKE 'postgis%' or name LIKE 'address%'; 67 | ``` 68 | 69 | === ":octicons-download-16: From tarballs" 70 | 71 | PostGIS is included into binary tarball and is a part of the `percona-postgresql{{pgversion}}` binary. Use the [install from tarballs](../tarball.md) tutorial to install it. 72 | 73 | 74 | ## Enable PostGIS extension 75 | 76 | 1. Create a database and a schema for this database to store your data. A schema is a container that logically segments objects (tables, functions, views, and so on) for better management. Run the following commands from the `psql` terminal: 77 | 78 | ```sql 79 | CREATE database nyc; 80 | \c nyc; 81 | CREATE SCHEMA gis; 82 | ``` 83 | 84 | 2. To make PostGIS functions and operations work, you need to enable the `postgis` extension. Make sure you are connected to the database you created earlier and run the following command: 85 | 86 | ```sql 87 | CREATE EXTENSION postgis; 88 | ``` 89 | 90 | 3. Check that the extension is enabled: 91 | 92 | ```sql 93 | SELECT postgis_full_version(); 94 | ``` 95 | 96 | The output should be similar to the following: 97 | 98 | ```{.sql .no-copy} 99 | postgis_full_version 100 | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 101 | POSTGIS="3.3.3" [EXTENSION] PGSQL="140" GEOS="3.10.2-CAPI-1.16.0" PROJ="8.2.1" LIBXML="2.9.13" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)" 102 | ``` 103 | 104 | ## Upload spatial data to PostgreSQL 105 | 106 | PostGIS provides the `shp2pgsql` command line utility that converts the binary data from shapefiles into the series of SQL commands and loads them into the database. 107 | 108 | 1. For testing purposes, download the sample data set: 109 | 110 | ```{.bash data-prompt="$"} 111 | $ curl -LO https://s3.amazonaws.com/s3.cleverelephant.ca/postgis-workshop-2020.zip 112 | ``` 113 | 114 | 2. Unzip the archive and from the folder where the `.shp` files are located, execute the following command and replace the `dbname` value with the name of your database: 115 | 116 | ```{.bash data-prompt="$"} 117 | shp2pgsql \ 118 | -D \ 119 | -I \ 120 | -s 26918 \ 121 | nyc_streets.shp \ 122 | nyc_streets \ 123 | | psql -U postgres dbname=nyc 124 | ``` 125 | 126 | The command does the following: 127 | 128 | * `-D` flag instructs the command to generate the dump format 129 | * `-I` flag instructs to create the spatial index on the table upon the data load 130 | * `-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. 131 | * `nyc_streets.shp` is the source shapefile 132 | * `nyc_streets` is the table name to create in the database 133 | * `dbname=nyc` is the database name 134 | 135 | 2. Check the uploaded data 136 | 137 | ```sql 138 | \d nyc_streets; 139 | Table "public.nyc_streets" 140 | Column | Type | Collation | Nullable | Default 141 | --------+---------------------------------+-----------+----------+------------------------------------------ 142 | gid | integer | | not null | nextval('nyc_streets_gid_seq'::regclass) 143 | id | double precision | | | 144 | name | character varying(200) | | | 145 | oneway | character varying(10) | | | 146 | type | character varying(50) | | | 147 | geom | geometry(MultiLineString,26918) | | | 148 | Indexes: 149 | "nyc_streets_pkey" PRIMARY KEY, btree (gid) 150 | "nyc_streets_geom_idx" gist (geom) 151 | ``` 152 | 153 | 3. Repeat the command to upload other shapefiles in the data set: `nyc_census_blocks`, `nyc_neighborhoods`, `nyc_subway_stations` -------------------------------------------------------------------------------- /docs/solutions/postgis-testing.md: -------------------------------------------------------------------------------- 1 | # Query spatial data 2 | 3 | After you [installed and set up PostGIS](postgis-deploy.md), let’s find answers to the following questions by querying the database: 4 | 5 | ## *What is the population of the New York City?* 6 | 7 | ```sql 8 | SELECT Sum(popn_total) AS population 9 | FROM nyc_census_blocks; 10 | ``` 11 | 12 | Output: 13 | 14 | ```{.sql .no-copy} 15 | population 16 | ------------ 17 | 8175032 18 | (1 row) 19 | ``` 20 | 21 | ## *What is the area of Central Park?* 22 | 23 | To get the answer we will use the `ST_Area` function that returns the areas of polygons. 24 | 25 | ```sql 26 | SELECT ST_Area(geom) / 1000000 27 | FROM nyc_neighborhoods 28 | WHERE name = 'Central Park'; 29 | ``` 30 | 31 | Output: 32 | 33 | ```{.sql .no-copy} 34 | st_area 35 | -------------------- 36 | 3.5198365965413293 37 | (1 row) 38 | ``` 39 | 40 | By default, the output is given in square meters. To get the value in square kilometers, divide it by 1 000 000. 41 | 42 | ## *How long is Columbus Circle?* 43 | 44 | ```sql 45 | SELECT ST_Length(geom) 46 | FROM nyc_streets 47 | WHERE name = 'Columbus Cir'; 48 | ``` 49 | 50 | Output: 51 | 52 | ```{.sql .no-copy} 53 | st_length 54 | ------------------- 55 | 308.3419936909855 56 | (1 row) 57 | ``` -------------------------------------------------------------------------------- /docs/solutions/postgis-upgrade.md: -------------------------------------------------------------------------------- 1 | # Spatial database upgrade 2 | 3 | When using PostgreSQL and PostGIS for some time, you may eventually come to the decision to upgrade your spatial database. There can be different reasons for that: to receive improvements and/or bug fixes that come with a minor version of the database/extension, reaching the end of life of the currently used software and others. 4 | 5 | The spatial database upgrade consists of two steps: 6 | 7 | * upgrade of PostgreSQL, and 8 | * upgrade of the PostGIS extension. 9 | 10 | !!! important 11 | 12 | Before the upgrade, backup your data. 13 | 14 | ## Upgrade PostGIS 15 | 16 | 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. 17 | 18 | PostGIS is enabled on the database level. This means that the upgrade is also done on the database level. 19 | 20 | === "PostGIS 3 and above" 21 | 22 | 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: 23 | 24 | ```sql 25 | SELECT postgis_extensions_upgrade(); 26 | ``` 27 | 28 | Repeat these steps to upgrade PostGIS on every database where it is enabled. 29 | 30 | === "PostGIS 2.5" 31 | 32 | Connect to the database with the enabled extension and run the following commands: 33 | 34 | ```sql 35 | ALTER EXTENSION postgis UPDATE; 36 | SELECT postgis_extensions_upgrade(); 37 | ``` 38 | 39 | Starting with version 3, vector and raster functionalities have been separated in two individual extensions. Thus, to upgrade those, you need to run the `postgis_extensions_upgrade();` twice. 40 | 41 | ```sql 42 | SELECT postgis_extensions_upgrade(); 43 | ``` 44 | 45 | TIP: If you don’t need the raster functionality, you can drop the `postgis_raster` extension after the upgrade. 46 | 47 | Repeat these steps to upgrade PostGIS on every database where it is enabled. 48 | 49 | ## Upgrade PostgreSQL 50 | 51 | Upgrade PostgreSQL either to the [latest minor](../minor-upgrade.md) or to the [major version](../major-upgrade.md). 52 | 53 | 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. 54 | -------------------------------------------------------------------------------- /docs/solutions/postgis.md: -------------------------------------------------------------------------------- 1 | # Spatial data manipulation 2 | 3 | !!! admonition "Version added: 15.3" 4 | 5 | Organizations dealing with spatial data need to store it somewhere and manipulate it. PostGIS is the open source extension for PostgreSQL that allows doing just that. It adds support for storing the spatial data types such as: 6 | 7 | * Geographical data like points, lines, polygons, GPS coordinates that can be mapped on a sphere. 8 | * Geometrical data. This is also points, lines and polygons but they apply to a 2D surface. 9 | 10 | 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). 11 | 12 | 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. 13 | 14 | ## When to use PostGIS 15 | 16 | You can use PostGIS in the following cases: 17 | 18 | * To store and manage spatial data, create and store spatial shapes, calculate areas and distances 19 | * To build the software that visualizes spatial data on a map, 20 | * To work with raster data, such as satellite imagery or digital elevation models. 21 | * To integrate spatial and non-spatial data such as demographic or economic data in a database 22 | 23 | ## When not to use PostGIS 24 | 25 | Despite its power and flexibility, PostGIS may not suit your needs if: 26 | 27 | * 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) 28 | * 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. 29 | * You need complex 3D analysis or visualization. 30 | * You need to acquire spatial data. Use other tools for this purpose and import spatial data into PostGIS to manipulate it. 31 | 32 | 33 | ## Next steps: 34 | 35 | [Deployment](postgis-deploy.md){.md-button} 36 | 37 | -------------------------------------------------------------------------------- /docs/tarball.md: -------------------------------------------------------------------------------- 1 | # Install Percona Distribution for PostgreSQL from binary tarballs 2 | 3 | You can download the tarballs using the links below. 4 | 5 | !!! note 6 | 7 | Unlike package managers, a tarball installation does **not** provide mechanisms to ensure that all dependencies are resolved to the correct library versions. There is no built-in method to verify that required libraries are present or to prevent them from being removed. As a result, unresolved or broken dependencies may lead to errors, crashes, or even data corruption. 8 | 9 | For this reason, tarball installations are **not recommended** for environments where safety, security, reliability, or mission-critical stability are required. 10 | 11 | The following tarballs are available for the x86_64 and ARM64 architectures: 12 | 13 | * [percona-postgresql-{{dockertag}}-ssl1.1-linux-aarch64.tar.gz](https://downloads.percona.com/downloads/postgresql-distribution-17/{{dockertag}}/binary/tarball/percona-postgresql-{{dockertag}}-ssl1.1-linux-aarch64.tar.gz) - for operating systems on ARM64 architecture that run OpenSSL version 1.x 14 | * [percona-postgresql-{{dockertag}}-ssl1.1-linux-x86_64.tar.gz](https://downloads.percona.com/downloads/postgresql-distribution-17/{{dockertag}}/binary/tarball/percona-postgresql-{{dockertag}}-ssl1.1-linux-x86_64.tar.gz) - for operating systems on x86_64 architecture that run OpenSSL version 1.x 15 | * [percona-postgresql-{{dockertag}}-ssl3-linux-aarch64.tar.gz](https://downloads.percona.com/downloads/postgresql-distribution-17/{{dockertag}}/binary/tarball/percona-postgresql-{{dockertag}}-ssl3-linux-aarch64.tar.gz) - for operating systems on ARM64 architecture that run OpenSSL version 3.x 16 | * [percona-postgresql-{{dockertag}}-ssl3-linux-x86_64.tar.gz](https://downloads.percona.com/downloads/postgresql-distribution-17/{{dockertag}}/binary/tarball/percona-postgresql-{{dockertag}}-ssl3-linux-x86_64.tar.gz) - for operating systems on x86_64 architecture that run OpenSSL version 3.x 17 | 18 | To check what OpenSSL version you have, run the following command: 19 | 20 | ```{.bash data-prompt="$"} 21 | $ openssl version 22 | ``` 23 | 24 | ## Tarball contents 25 | 26 | The tarballs include the following components: 27 | 28 | | Component | Description | 29 | |-----------|-------------| 30 | | percona-postgresql{{pgversion}}| The latest version of PostgreSQL server and the following extensions:
    - `pgaudit`
    - `pgAudit_set_user`
    - `pg_repack`
    - `pg_stat_monitor`
    - `pg_gather`
    - `wal2json`
    - `postGIS`
    - the set of [contrib extensions](contrib.md)| 31 | | percona-haproxy | A high-availability solution and load-balancing solution | 32 | | percona-patroni | A high-availability solution for PostgreSQL | 33 | | percona-pgbackrest| A backup and restore tool | 34 | | percona-pgbadger| PostgreSQL log analyzer with fully detailed reports and graphs | 35 | | percona-pgbouncer| Lightweight connection pooler for PostgreSQL | 36 | | percona-pgpool-II| A middleware between PostgreSQL server and client for high availability, connection pooling and load balancing | 37 | | percona-perl | A Perl module required to create the `plperl` extension - a procedural language handler for PostgreSQL that allows writing functions in the Perl programming language| 38 | | percona-python3 | A Python3 module required to create `plpython` extension - a procedural language handler for PostgreSQL that allows writing functions in the Python programming language. Python is also required by Patroni 39 | | percona-tcl | Tcl development libraries required to create the `pltcl` extension - a loadable procedural language for the PostgreSQL database system that enables the creation of functions and trigger procedures in the Tcl language | 40 | | percona-etcd | A key-value distributed store that stores the state of the PostgreSQL cluster| 41 | 42 | ## Preconditions 43 | 44 | === "Debian and Ubuntu" 45 | 46 | 1. Uninstall the upstream PostgreSQL package. 47 | 2. Ensure that the `libreadline` is present on the system, as it is **required** for tarballs to work correctly: 48 | 49 | ```{.bash data-prompt="$"} 50 | $ sudo apt install -y libreadline-dev 51 | ``` 52 | 53 | 3. Create the user to own the PostgreSQL process. For example, `mypguser`. Run the following command: 54 | 55 | ```{.bash data-prompt="$"} 56 | $ sudo useradd -m mypguser 57 | ``` 58 | 59 | Set the password for the user: 60 | 61 | ```{.bash data-prompt="$"} 62 | $ sudo passwd mypguser 63 | ``` 64 | 65 | === "RHEL and derivatives" 66 | 67 | Ensure that the `libreadline` is present on the system, as it is **required** for tarballs to work correctly: 68 | 69 | ```{.bash data-prompt="$"} 70 | $ sudo yum install -y readline-devel 71 | ``` 72 | 73 | Create the user to own the PostgreSQL process. For example, `mypguser`, Run the following command: 74 | 75 | ```{.bash data-prompt="$"} 76 | $ sudo useradd mypguser -m 77 | ``` 78 | 79 | Set the password for the user: 80 | 81 | ```{.bash data-prompt="$"} 82 | $ sudo passwd mypguser 83 | ``` 84 | 85 | ## Procedure 86 | 87 | The steps below install the tarballs for OpenSSL 3.x on x86_64 architecture. Use another tarball if your operating system has OpenSSL version 1.x and / or has the ARM64 architecture. 88 | 89 | 1. Create the directory where you will store the binaries. For example, `/opt/pgdistro` 90 | 91 | 2. Grant access to this directory for the `mypguser` user. 92 | 93 | ```{.bash data-prompt="$"} 94 | $ sudo chown mypguser:mypguser /opt/pgdistro/ 95 | ``` 96 | 97 | 3. Fetch the binary tarball. 98 | 99 | ```{.bash data-prompt="$"} 100 | $ wget https://downloads.percona.com/downloads/postgresql-distribution-17/{{dockertag}}/binary/tarball/percona-postgresql-{{dockertag}}-ssl3-linux-x86_64.tar.gz 101 | ``` 102 | 103 | 4. Extract the tarball to the directory for binaries that you created on step 1. 104 | 105 | ```{.bash data-prompt="$"} 106 | $ sudo tar -xvf percona-postgresql-{{dockertag}}-ssl3-linux-x86_64.tar.gz -C /opt/pgdistro/ 107 | ``` 108 | 109 | 5. If you extracted the tarball in a directory other than `/opt`, copy `percona-python3`, `percona-tcl` and `percona-perl` to the `/opt` directory. This is required for the correct run of libraries that require those modules. 110 | 111 | ```{.bash data-prompt="$"} 112 | $ sudo cp /percona-perl /percona-python3 /percona-tcl /opt/ 113 | ``` 114 | 115 | 6. Add the location of the binaries to the PATH variable: 116 | 117 | ```{.bash data-prompt="$"} 118 | $ export PATH=:/opt/pgdistro/percona-haproxy/sbin/:/opt/pgdistro/percona-patroni/bin/:/opt/pgdistro/percona-pgbackrest/bin/:/opt/pgdistro/percona-pgbadger/:/opt/pgdistro/percona-pgbouncer/bin/:/opt/pgdistro/percona-pgpool-II/bin/:/opt/pgdistro/percona-postgresql{{pgversion}}/bin/:/opt/pgdistro/percona-etcd/bin/:/opt/percona-perl/bin/:/opt/percona-tcl/bin/:/opt/percona-python3/bin/:$PATH 119 | ``` 120 | 121 | 6. Create the data directory for PostgreSQL server. For example, `/usr/local/pgsql/data`. 122 | 7. Grant access to this directory for the `mypguser` user. 123 | 124 | ```{.bash data-prompt="$"} 125 | $ sudo chown mypguser:mypguser /usr/local/pgsql/data 126 | ``` 127 | 128 | 8. Switch to the user that owns the Postgres process. In our example, `mypguser`: 129 | 130 | ```{.bash data-prompt="$"} 131 | $ su - mypguser 132 | ``` 133 | 134 | 9. Initiate the PostgreSQL data directory: 135 | 136 | ```{.bash data-prompt="$"} 137 | $ /opt/pgdistro/percona-postgresql{{pgversion}}/bin/initdb -D /usr/local/pgsql/data 138 | ``` 139 | 140 | ??? example "Sample output" 141 | 142 | ```{.text .no-copy} 143 | Success. You can now start the database server using: 144 | 145 | /opt/pgdistro/percona-postgresql{{pgversion}}/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start 146 | ``` 147 | 148 | 10. Start the PostgreSQL server: 149 | 150 | ```{.bash data-prompt="$"} 151 | $ /opt/pgdistro/percona-postgresql{{pgversion}}/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start 152 | ``` 153 | 154 | ??? example "Sample output" 155 | 156 | ```{.text .no-copy} 157 | waiting for server to start.... done 158 | server started 159 | ``` 160 | 161 | 9. Connect to `psql` 162 | 163 | ```{.bash data-prompt="$"} 164 | $ /opt/pgdistro/percona-postgresql{{pgversion}}/bin/psql -d postgres 165 | ``` 166 | 167 | ??? example "Sample output" 168 | 169 | ```{.text .no-copy} 170 | psql ({{pspgversion}} (Percona Server for PostgreSQL), server {{pspgversion}} (Percona Server for PostgreSQL)) 171 | Type "help" for help. 172 | 173 | postgres=# 174 | ``` 175 | 176 | ### Start the components 177 | 178 | After you unpacked the tarball and added the location of the components' binaries to the `$PATH` variable, the components are available for use. You can invoke a component by running its command-line tool. 179 | 180 | For example, to check HAProxy version, type: 181 | 182 | ```{.bash data-prompt="$"} 183 | $ haproxy version 184 | ``` 185 | 186 | Some components require additional setup. Check the [Enabling extensions](enable-extensions.md) page for details. 187 | -------------------------------------------------------------------------------- /docs/templates/pdf_cover_page.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{ config.extra.added_key }} 3 |

    4 | 5 |

    6 |

    Distribution for PostgreSQL

    7 | {% if config.site_description %} 8 |

    {{ config.site_description }}

    9 | {% endif %} 10 |

    17.5.1 (May 28, 2025)

    11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/third-party.md: -------------------------------------------------------------------------------- 1 | # Third-party components 2 | 3 | Percona Distribution for PostgreSQL is supplied with the set of third-party open source components and tools that provide additional functionality such as high-availability or disaster recovery, without the need of modifying PostgreSQL core code. These components are included in the Percona Distribution for PostgreSQL repository and are tested to work together. 4 | 5 | 6 | | Name | Superuser privileges | Description | 7 | |------|---------------------|-------------| 8 | | [etcd](https://etcd.io/)| Required | A distributed, reliable key-value store for setting up high available Patroni clusters | 9 | | [HAProxy](http://www.haproxy.org/) | Required | A high-availability and load-balancing solution | 10 | | [Patroni](https://patroni.readthedocs.io/en/latest/) | Required | An HA (High Availability) solution for PostgreSQL | 11 | | [pgAudit](https://www.pgaudit.org/) | Required | Provides detailed session or object audit logging via the standard PostgreSQL logging facility | 12 | | [pgAudit set_user](https://github.com/pgaudit/set_user) | Required | The `set_user` part of `pgAudit` extension provides an additional layer of logging and control when unprivileged users must escalate themselves to superuser or object owner roles in order to perform needed maintenance tasks | 13 | | [pgBackRest](https://pgbackrest.org/) | Required | A backup and restore solution for PostgreSQL | 14 | | [pgBadger](https://github.com/darold/pgbadger) | Required | A fast PostgreSQL Log Analyzer | 15 | | [PgBouncer](https://www.pgbouncer.org/) | Required | A lightweight connection pooler for PostgreSQL | 16 | | [pg_gather](https://github.com/jobinau/pg_gather) | Required | An SQL script to assess the health of PostgreSQL cluster by gathering performance and configuration data from PostgreSQL databases | 17 | | [pgpool2](https://www.pgpool.net/mediawiki/index.php/Main_Page) | Required | A middleware between PostgreSQL server and client for high availability, connection pooling and load balancing | 18 | | [pg_repack](https://github.com/reorg/pg_repack) | Required | Rebuilds PostgreSQL database objects | 19 | | [pg_stat_monitor](https://github.com/percona/pg_stat_monitor) | Required | Collects and aggregates statistics for PostgreSQL and provides histogram information | 20 | | [pgvector](https://github.com/pgvector/pgvector)| Required | A vector similarity search for PostgreSQL| 21 | | [PostGIS](http://postgis.net/) | Required | Allows storing and manipulating spacial data in PostgreSQL | 22 | |[wal2json](https://github.com/eulerto/wal2json)|Required| A PostgreSQL logical decoding JSON output plugin.| -------------------------------------------------------------------------------- /docs/trademark-policy.md: -------------------------------------------------------------------------------- 1 | # Trademark Policy 2 | 3 | This [Trademark Policy :octicons-link-external-16:](https://www.percona.com/trademark-policy) is to ensure that users of Percona-branded products or 4 | services know that what they receive has really been developed, approved, 5 | tested and maintained by Percona. Trademarks help to prevent confusion in the 6 | marketplace, by distinguishing one company’s or person’s products and services 7 | from another’s. 8 | 9 | Percona owns a number of marks, including but not limited to Percona, XtraDB, 10 | Percona XtraDB, XtraBackup, Percona XtraBackup, Percona Server, and Percona 11 | Live, plus the distinctive visual icons and logos associated with these marks. 12 | Both the unregistered and registered marks of Percona are protected. 13 | 14 | Use of any Percona trademark in the name, URL, or other identifying 15 | characteristic of any product, service, website, or other use is not permitted 16 | without Percona’s written permission with the following three limited 17 | exceptions. 18 | 19 | *First*, you may use the appropriate Percona mark when making a nominative fair 20 | use reference to a bona fide Percona product. 21 | 22 | *Second*, when Percona has released a product under a version of the GNU 23 | General Public License (“GPL”), you may use the appropriate Percona mark when 24 | distributing a verbatim copy of that product in accordance with the terms and 25 | conditions of the GPL. 26 | 27 | *Third*, you may use the appropriate Percona mark to refer to a distribution of 28 | GPL-released Percona software that has been modified with minor changes for 29 | the sole purpose of allowing the software to operate on an operating system or 30 | hardware platform for which Percona has not yet released the software, provided 31 | that those third party changes do not affect the behavior, functionality, 32 | features, design or performance of the software. Users who acquire this 33 | Percona-branded software receive substantially exact implementations of the 34 | Percona software. 35 | 36 | Percona reserves the right to revoke this authorization at any time in its sole 37 | discretion. For example, if Percona believes that your modification is beyond 38 | the scope of the limited license granted in this Policy or that your use of the 39 | Percona mark is detrimental to Percona, Percona will revoke this authorization. 40 | Upon revocation, you must immediately cease using the applicable Percona mark. 41 | If you do not immediately cease using the Percona mark upon revocation, Percona 42 | may take action to protect its rights and interests in the Percona mark. 43 | Percona does not grant any license to use any Percona mark for any other 44 | modified versions of Percona software; such use will require our prior written 45 | permission. 46 | 47 | Neither trademark law nor any of the exceptions set forth in this Trademark 48 | Policy permit you to truncate, modify or otherwise use any Percona mark as part 49 | of your own brand. For example, if XYZ creates a modified version of the 50 | Percona Server, XYZ may not brand that modification as “XYZ Percona Server” or 51 | “Percona XYZ Server”, even if that modification otherwise complies with the 52 | third exception noted above. 53 | 54 | In all cases, you must comply with applicable law, the underlying license, and 55 | this Trademark Policy, as amended from time to time. For instance, any mention 56 | of Percona trademarks should include the full trademarked name, with proper 57 | spelling and capitalization, along with attribution of ownership to Percona 58 | Inc. For example, the full proper name for XtraBackup is Percona XtraBackup. 59 | However, it is acceptable to omit the word “Percona” for brevity on the second 60 | and subsequent uses, where such omission does not cause confusion. 61 | 62 | In the event of doubt as to any of the conditions or exceptions outlined in 63 | this Trademark Policy, please contact [trademarks@percona.com](mailto:trademarks@percona.com) for assistance and 64 | we will do our very best to be helpful. 65 | -------------------------------------------------------------------------------- /docs/troubleshooting.md: -------------------------------------------------------------------------------- 1 | # Troubleshooting guide 2 | 3 | ## Cannot create a table. Permission denied in schema `public` 4 | 5 | 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. 6 | 7 | When you create a table without specifying a schema name, it ends up in the `public` schema by default. 8 | 9 | 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. 10 | 11 | To create a schema, use the following statement: 12 | 13 | ```sql 14 | CREATE SCHEMA demo; 15 | ``` 16 | 17 | To ensure all tables end up in your newly created schema, use the following statement ot set the schema: 18 | 19 | ```sql 20 | SET SCHEMA demo; 21 | ``` 22 | 23 | Replace the `demo` name with your value. 24 | -------------------------------------------------------------------------------- /docs/uninstalling.md: -------------------------------------------------------------------------------- 1 | # Uninstalling Percona Distribution for PostgreSQL 2 | 3 | To uninstall Percona Distribution for PostgreSQL, remove all the installed packages and data / configuration files. 4 | 5 | **NOTE**: Should you need the data files later, back up your data before uninstalling Percona Distribution for PostgreSQL. 6 | 7 | === ":material-debian: On Debian and Ubuntu using `apt`" 8 | 9 | To uninstall Percona Distribution for PostgreSQL on platforms that use **apt** package manager such as Debian 10 | or Ubuntu, complete the following steps. 11 | 12 | Run all commands as root or via **sudo**. 13 | {.power-number} 14 | 15 | 16 | 1. Stop the Percona Distribution for PostgreSQL service. 17 | 18 | ```{.bash data-prompt="$"} 19 | $ sudo systemctl stop postgresql.service 20 | ``` 21 | 22 | 2. Remove the **percona-postgresql** packages. 23 | 24 | ```{.bash data-prompt="$"} 25 | $ sudo apt remove percona-postgresql-{{pgversion}}* percona-patroni percona-pgbackrest percona-pgbadger percona-pgbouncer 26 | ``` 27 | 28 | 29 | 3. Remove configuration and data files. 30 | 31 | ```{.bash data-prompt="$"} 32 | $ rm -rf /etc/postgresql/{{pgversion}}/main 33 | ``` 34 | 35 | === ":material-redhat: On Red Hat Enterprise Linux and derivatives using `yum`" 36 | 37 | To uninstall Percona Distribution for PostgreSQL on platforms that use **yum** package manager such as 38 | Red Hat Enterprise Linux or CentOS, complete the following steps. 39 | 40 | Run all commands as root or via **sudo**. 41 | {.power-number} 42 | 43 | 44 | 1. Stop the Percona Distribution for PostgreSQL service. 45 | 46 | ```{.bash data-prompt="$"} 47 | $ sudo systemctl stop postgresql-{{pgversion}} 48 | ``` 49 | 50 | 51 | 2. Remove the **percona-postgresql** packages 52 | 53 | ```{.bash data-prompt="$"} 54 | $ sudo yum remove percona-postgresql{{pgversion}}* percona-pgbadger 55 | ``` 56 | 57 | 58 | 3. Remove configuration and data files 59 | 60 | ```{.bash data-prompt="$"} 61 | $ rm -rf /var/lib/pgsql/{{pgversion}}/data 62 | ``` 63 | 64 | ## Uninstall from tarballs 65 | 66 | If you [installed Percona Distribution for PostgreSQL from binary tarballs](tarball.md), stop the PostgreSQL server and remove the folder with the binary tarballs. 67 | 68 | 1. Stop the `postgres` server: 69 | 70 | ```{.bash data-prompt="$"} 71 | $ /path/to/tarballs/percona-postgresql{{pgversion}}/bin/pg_ctl -D path/to/datadir -l logfile stop 72 | ``` 73 | 74 | ??? example "Sample output" 75 | 76 | ```{.text .no-copy} 77 | waiting for server to shut down.... done 78 | server stopped 79 | ``` 80 | 81 | 2. Remove the directory with extracted tarballs 82 | 83 | ```{.bash data-prompt="$"} 84 | $ sudo rm -rf /path/to/tarballs/ 85 | ``` -------------------------------------------------------------------------------- /docs/whats-next.md: -------------------------------------------------------------------------------- 1 | # What's next? 2 | 3 | You've just had your first hands-on experience with PostgreSQL! That's a great start. 4 | 5 | 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: 6 | 7 | - [SQL Syntax :octicons-link-external-16:](https://www.postgresql.org/docs/current/sql-syntax.html) 8 | - [Data definition :octicons-link-external-16:](https://www.postgresql.org/docs/current/ddl.html) 9 | - [Queries :octicons-link-external-16:](https://www.postgresql.org/docs/current/queries.html) 10 | - [Functions and Operators :octicons-link-external-16:](https://www.postgresql.org/docs/current/functions.html) 11 | - [Indexes :octicons-link-external-16:](https://www.postgresql.org/docs/current/indexes.html) 12 | 13 | 14 | To effectively solve database administration tasks, master these essential topics: 15 | 16 | - [Backup and restore :octicons-link-external-16:](https://www.postgresql.org/docs/current/backup.html) 17 | - [Authentication :octicons-link-external-16:](https://www.postgresql.org/docs/{{pgversion}}/auth-methods.html) and role-based access control 18 | - [PostgreSQL contrib extensions and modules](contrib.md) 19 | - [Monitor PostgreSQL with Percona Monitoring and Management :octicons-link-external-16:](https://docs.percona.com/percona-monitoring-and-management/quickstart/index.html) 20 | 21 | 22 | Also, check out our solutions to help you meet the requirements of your organization. 23 | 24 | [Solutions](solutions.md){.md-button} 25 | 26 | -------------------------------------------------------------------------------- /mkdocs-base.yml: -------------------------------------------------------------------------------- 1 | # MkDocs configuration for builds with Material theme 2 | 3 | site_name: Percona Distribution for PostgreSQL 4 | site_description: Documentation 5 | site_author: Percona LLC 6 | copyright: Percona LLC and/or its affiliates © 2025 — Cookie Consent 7 | 8 | repo_name: percona/postgresql-docs 9 | repo_url: https://github.com/percona/postgresql-docs 10 | edit_uri: edit/17/docs/ 11 | 12 | use_directory_urls: false 13 | 14 | # Material theme features 15 | theme: 16 | name: material 17 | logo: _images/postgresql-mark.svg 18 | favicon: _images/postgresql-fav.svg 19 | custom_dir: _resource/overrides/ 20 | font: 21 | text: Roboto 22 | code: Roboto Mono 23 | icon: 24 | edit: material/file-edit-outline 25 | view: material/file-eye-outline 26 | 27 | palette: 28 | - media: "(prefers-color-scheme)" 29 | toggle: 30 | icon: material/brightness-auto 31 | name: Color theme set to Automatic. Click to change 32 | - media: "(prefers-color-scheme: light)" 33 | scheme: percona-light 34 | primary: custom 35 | accent: custom 36 | toggle: 37 | icon: material/brightness-7 38 | name: Color theme set to Light Mode. Click to change 39 | - media: "(prefers-color-scheme: dark)" 40 | scheme: percona-dark 41 | primary: custom 42 | accent: custom 43 | toggle: 44 | icon: material/brightness-4 45 | name: Color theme set to Dark Mode. Click to change 46 | 47 | # Theme features 48 | 49 | features: 50 | - search.highlight 51 | - navigation.top 52 | - navigation.tracking 53 | - content.tabs.link 54 | - content.action.edit 55 | - content.action.view 56 | - content.code.copy 57 | 58 | extra_css: 59 | - https://unicons.iconscout.com/release/v3.0.3/css/line.css 60 | - https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css 61 | - css/percona.css 62 | - css/extra.css 63 | - css/design.css 64 | - css/osano.css 65 | - css/landing.css 66 | - css/postgresql.css 67 | 68 | extra_javascript: 69 | - js/version-select.js 70 | - js/promptremover.js 71 | - js/consent.css 72 | 73 | markdown_extensions: 74 | attr_list: {} 75 | toc: 76 | permalink: True 77 | title: On this page 78 | admonition: {} 79 | footnotes: {} 80 | def_list: {} # https://michelf.ca/projects/php-markdown/extra/#def-list 81 | meta: {} 82 | md_in_html: {} 83 | smarty: 84 | {smart_angled_quotes: true} 85 | pymdownx.details: {} 86 | pymdownx.mark: {} 87 | pymdownx.smartsymbols: {} 88 | pymdownx.tabbed: 89 | {alternate_style: true} 90 | pymdownx.tilde: {} 91 | pymdownx.superfences: 92 | custom_fences: 93 | - name: mermaid 94 | class: mermaid 95 | format: !!python/name:pymdownx.superfences.fence_code_format 96 | pymdownx.highlight: 97 | use_pygments: true 98 | pymdownx.inlinehilite: {} 99 | pymdownx.snippets: 100 | base_path: ["snippets"] 101 | # auto_append: 102 | # - services-banner.md 103 | pymdownx.emoji: 104 | emoji_index: !!python/name:material.extensions.emoji.twemoji 105 | emoji_generator: !!python/name:material.extensions.emoji.to_svg 106 | options: 107 | custom_icons: 108 | - _resource/.icons 109 | 110 | 111 | plugins: 112 | section-index: {} 113 | search: 114 | separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])' 115 | git-revision-date-localized: 116 | enable_creation_date: true 117 | enabled: !ENV [ENABLED_GIT_REVISION_DATE, True] 118 | meta-descriptions: 119 | export_csv: false 120 | quiet: false 121 | enable_checks: false 122 | min_length: 50 123 | max_length: 160 124 | macros: 125 | include_yaml: 126 | - 'variables.yml' # Use in markdown as '{{ VAR }}' 127 | mike: 128 | version_selector: true 129 | css_dir: css 130 | javascript_dir: js 131 | canonical_version: null 132 | print-site: 133 | add_to_navigation: false 134 | print_page_title: 'Percona Distribution for PostgreSQL documentation' 135 | add_print_site_banner: false 136 | # Table of contents 137 | add_table_of_contents: true 138 | toc_title: 'Table of Contents' 139 | toc_depth: 2 140 | # Content-related 141 | add_full_urls: false 142 | enumerate_headings: false 143 | enumerate_headings_depth: 1 144 | enumerate_figures: true 145 | add_cover_page: true 146 | cover_page_template: "docs/templates/pdf_cover_page.tpl" 147 | path_to_pdf: "" 148 | include_css: true 149 | enabled: true 150 | 151 | extra: 152 | version: 153 | provider: mike 154 | #homepage: 155 | # https://docs.percona.com 156 | postgresrecommended: 17 157 | # Google Analytics configuration 158 | analytics: 159 | provider: google 160 | property: G-J4J70BNH0G 161 | feedback: 162 | title: Was this page helpful? 163 | ratings: 164 | - icon: material/emoticon-happy-outline 165 | name: This page was helpful 166 | data: 1 167 | note: >- 168 | Thanks for your feedback! 169 | - icon: material/emoticon-sad-outline 170 | name: This page could be improved 171 | data: 0 172 | note: >- 173 | Thank you for your feedback! Help us improve by using our 174 | 175 | feedback form. 176 | 177 | nav: 178 | - index.md 179 | - get-help.md 180 | - Get started: 181 | - installing.md 182 | - 1. Install: 183 | - apt.md 184 | - yum.md 185 | - tarball.md 186 | - docker.md 187 | - enable-extensions.md 188 | - repo-overview.md 189 | - 2. Connect to PostgreSQL: 190 | - connect.md 191 | - 3. Manipulate data in PostgreSQL: 192 | - crud.md 193 | - 4. What's next: 194 | - whats-next.md 195 | - Extensions: 196 | - extensions.md 197 | - contrib.md 198 | - percona-ext.md 199 | - third-party.md 200 | - Solutions: 201 | - solutions.md 202 | - High availability: 203 | - solutions/high-availability.md 204 | - solutions/ha-setup-apt.md 205 | - solutions/ha-setup-yum.md 206 | - solutions/pgbackrest.md 207 | - solutions/ha-test.md 208 | - Backup and disaster recovery: 209 | - solutions/backup-recovery.md 210 | - solutions/dr-pgbackrest-setup.md 211 | - Spatial data handling: 212 | - solutions/postgis.md 213 | - solutions/postgis-deploy.md 214 | - solutions/postgis-testing.md 215 | - solutions/postgis-upgrade.md 216 | - ldap.md 217 | - Upgrade: 218 | - major-upgrade.md 219 | - minor-upgrade.md 220 | - migration.md 221 | - troubleshooting.md 222 | - uninstalling.md 223 | - release-notes.md 224 | - release-notes-v17.5.md 225 | - release-notes-v17.4.md 226 | - release-notes-v17.2.md 227 | - release-notes-v17.0.md 228 | - telemetry.md 229 | - licensing.md 230 | - trademark-policy.md 231 | 232 | 233 | 234 | -------------------------------------------------------------------------------- /mkdocs-pdf.yml: -------------------------------------------------------------------------------- 1 | # MkDocs configuration for PDF builds 2 | # Usage: ENABLE_PDF_EXPORT=1 mkdocs build -f mkdocs-pdf.yml 3 | 4 | INHERIT: mkdocs-base.yml 5 | 6 | copyright: Percona LLC, © 2025 7 | 8 | extra_css: 9 | - https://unicons.iconscout.com/release/v3.0.3/css/line.css 10 | - https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css 11 | - css/percona.css 12 | - css/extra.css 13 | - css/osano.css 14 | 15 | markdown_extensions: 16 | pymdownx.tabbed: {} 17 | admonition: {} 18 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | # MkDocs configuration for builds with material theme 2 | 3 | INHERIT: mkdocs-base.yml 4 | 5 | site_url: "https://docs.percona.com/postgresql/" 6 | 7 | theme: 8 | name: material 9 | custom_dir: _resourcepdf/overrides/ 10 | 11 | extra: 12 | analytics: 13 | provider: google 14 | property: G-J4J70BNH0G 15 | feedback: 16 | title: Was this page helpful? 17 | ratings: 18 | - icon: material/emoticon-happy-outline 19 | name: This page was helpful 20 | data: 1 21 | note: >- 22 | Thanks for your feedback! 23 | - icon: material/emoticon-sad-outline 24 | name: This page could be improved 25 | data: 0 26 | note: >- 27 | Thank you for your feedback! Help us improve by using our 28 | 29 | feedback form. 30 | 31 | nav: 32 | - 'Home': 'index.md' 33 | - 'Percona Server for PostgreSQL': postgresql-server.md 34 | - get-help.md 35 | - Get started: 36 | - Quickstart guide: installing.md 37 | - 1. Install: 38 | - Via apt: apt.md 39 | - Via yum: yum.md 40 | - From tarballs: tarball.md 41 | - Run in Docker: docker.md 42 | - enable-extensions.md 43 | - repo-overview.md 44 | - 2. Connect to PostgreSQL: connect.md 45 | - 3. Manipulate data in PostgreSQL: crud.md 46 | - 4. What's next: whats-next.md 47 | - Extensions: 48 | - 'Extensions': extensions.md 49 | - contrib.md 50 | - Percona-authored extensions: percona-ext.md 51 | - third-party.md 52 | - Solutions: 53 | - Overview: solutions.md 54 | - High availability: 55 | - 'High availability': 'solutions/high-availability.md' 56 | - 'Deploying on Debian or Ubuntu': 'solutions/ha-setup-apt.md' 57 | - 'Deploying on RHEL or derivatives': 'solutions/ha-setup-yum.md' 58 | - solutions/pgbackrest.md 59 | - solutions/ha-test.md 60 | - Backup and disaster recovery: 61 | - 'Overview': 'solutions/backup-recovery.md' 62 | - solutions/dr-pgbackrest-setup.md 63 | - Spatial data handling: 64 | - Overview: solutions/postgis.md 65 | - Deployment: solutions/postgis-deploy.md 66 | - Query spatial data: solutions/postgis-testing.md 67 | - Upgrade spatial database: solutions/postgis-upgrade.md 68 | - LDAP authentication: 69 | - ldap.md 70 | - Upgrade: 71 | - "Major upgrade": major-upgrade.md 72 | - minor-upgrade.md 73 | - migration.md 74 | - Troubleshooting guide: troubleshooting.md 75 | - Uninstall: uninstalling.md 76 | - Release Notes: 77 | - "Release notes index": "release-notes.md" 78 | - release-notes-v17.5.md 79 | - release-notes-v17.4.md 80 | - release-notes-v17.2.md 81 | - release-notes-v17.0.md 82 | - Reference: 83 | - Telemetry: telemetry.md 84 | - Licensing: licensing.md 85 | - Trademark policy: trademark-policy.md 86 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # This file is used to install the required packages for the doc project. 2 | # Ensure you are in the same location/root that the requirements.txt file is in. 3 | # It is recommended to use Windows Powershell in Administrator mode or Linux Terminal to run the commands. 4 | # You can install the required packages using the following command: 5 | # pip install -r requirements.txt 6 | # This will install all the packages listed in this file. 7 | # To update the packages, run the following command: 8 | # pip install --upgrade -r requirements.txt 9 | # To check for outdated packages, run the following command: 10 | # pip list --outdated 11 | Markdown 12 | mkdocs 13 | mkdocs-versioning 14 | mkdocs-macros-plugin 15 | mkdocs-exclude 16 | markdown-include 17 | mkdocs-material 18 | mkdocs-with-pdf 19 | mkdocs-git-revision-date-localized-plugin 20 | mkdocs-material-extensions 21 | mkdocs-bootstrap-tables-plugin 22 | mkdocs-section-index 23 | mkdocs-htmlproofer-plugin 24 | mkdocs-meta-descriptions-plugin 25 | mike 26 | Pillow > 10.1.0 27 | mkdocs-open-in-new-tab 28 | mkdocs-print-site-plugin 29 | -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | 3.8 2 | -------------------------------------------------------------------------------- /snippets/check-etcd.md: -------------------------------------------------------------------------------- 1 | 3. Check the etcd cluster members. Use `etcdctl` for this purpose. Ensure that `etcdctl` interacts with etcd using API version 3 and knows which nodes, or endpoints, to communicate with. For this, we will define the required information as environment variables. Run the following commands on one of the nodes: 2 | 3 | ``` 4 | export ETCDCTL_API=3 5 | HOST_1=10.104.0.1 6 | HOST_2=10.104.0.2 7 | HOST_3=10.104.0.3 8 | ENDPOINTS=$HOST_1:2379,$HOST_2:2379,$HOST_3:2379 9 | ``` 10 | 11 | 4. Now, list the cluster members and output the result as a table as follows: 12 | 13 | ```{.bash data-prompt="$"} 14 | $ sudo etcdctl --endpoints=$ENDPOINTS -w table member list 15 | ``` 16 | 17 | ??? example "Sample output" 18 | 19 | ``` 20 | +------------------+---------+-------+------------------------+----------------------------+------------+ 21 | | ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS | IS LEARNER | 22 | +------------------+---------+-------+------------------------+----------------------------+------------+ 23 | | 4788684035f976d3 | started | node2 | http://10.104.0.2:2380 | http://192.168.56.102:2379 | false | 24 | | 67684e355c833ffa | started | node3 | http://10.104.0.3:2380 | http://192.168.56.103:2379 | false | 25 | | 9d2e318af9306c67 | started | node1 | http://10.104.0.1:2380 | http://192.168.56.101:2379 | false | 26 | +------------------+---------+-------+------------------------+----------------------------+------------+ 27 | ``` 28 | 29 | 5. To check what node is currently the leader, use the following command 30 | 31 | ```{.bash data-prompt="$"} 32 | $ sudo etcdctl --endpoints=$ENDPOINTS -w table endpoint status 33 | ``` 34 | 35 | ??? example "Sample output" 36 | 37 | ```{.text .no-copy} 38 | +-----------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+ 39 | | ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS | 40 | +-----------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+ 41 | | 10.104.0.1:2379 | 9d2e318af9306c67 | 3.5.16 | 20 kB | true | false | 2 | 10 | 10 | | 42 | | 10.104.0.2:2379 | 4788684035f976d3 | 3.5.16 | 20 kB | false | false | 2 | 10 | 10 | | 43 | | 10.104.0.3:2379 | 67684e355c833ffa | 3.5.16 | 20 kB | false | false | 2 | 10 | 10 | | 44 | +-----------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+ 45 | ``` 46 | 47 | -------------------------------------------------------------------------------- /snippets/percona-release-apt.md: -------------------------------------------------------------------------------- 1 | 1. Install the `curl` download utility if it's not installed already: 2 | 3 | ```{.bash data-prompt="$"} 4 | $ sudo apt update 5 | $ sudo apt install curl 6 | ``` 7 | 8 | 2. Download the `percona-release` repository package: 9 | 10 | ```{.bash data-prompt="$"} 11 | $ curl -O https://repo.percona.com/apt/percona-release_latest.generic_all.deb 12 | ``` 13 | 14 | 3. Install the downloaded repository package and its dependencies using `apt`: 15 | 16 | ```{.bash data-prompt="$"} 17 | $ sudo apt install gnupg2 lsb-release ./percona-release_latest.generic_all.deb 18 | ``` 19 | 20 | 4. Refresh the local cache to update the package information: 21 | 22 | ```{.bash data-prompt="$"} 23 | $ sudo apt update 24 | ``` -------------------------------------------------------------------------------- /snippets/percona-release-yum.md: -------------------------------------------------------------------------------- 1 | Run the following command as the `root` user or with `sudo` privileges: 2 | 3 | ```{.bash data-prompt="$"} 4 | $ sudo yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm 5 | ``` -------------------------------------------------------------------------------- /snippets/release-notes-intro.md: -------------------------------------------------------------------------------- 1 | Percona Distribution for PostgreSQL is a solution that includes PostgreSQL server and the collection of tools from PostgreSQL community. These tools are tested to work together and serve to assist you in deploying and managing PostgreSQL. 2 | 3 | The aim of Percona Distribution for PostgreSQL is to address the operational issues like High-Availability, Disaster Recovery, Security, Observability, Spatial data handling, Performance and Scalability, and others that enterprises are facing. -------------------------------------------------------------------------------- /snippets/supported-versions.md: -------------------------------------------------------------------------------- 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 :octicons-link-external-16:](https://www.percona.com/services/policies/percona-software-support-lifecycle#pgsql). 2 | -------------------------------------------------------------------------------- /variables.yml: -------------------------------------------------------------------------------- 1 | # PG Variables set for HTML output 2 | # See also mkdocs.yml plugins.with-pdf.cover_subtitle and output_path 3 | 4 | release: 'release-notes-v17.5' 5 | dockertag: '17.5' 6 | pgversion: '17' 7 | pspgversion: '17.5.1' 8 | 9 | 10 | 11 | date: 12 | 17_5: 2025-05-28 13 | 17_4: 2025-03-27 14 | 17_2: 2024-12-26 15 | 17_0: 2024-10-03 16 | 17 | 18 | --------------------------------------------------------------------------------