From 4649283d8a54ef6a1202dbd8cd979b619ca7ab06 Mon Sep 17 00:00:00 2001 From: Anastasia Alexadrova Date: Wed, 11 Dec 2024 17:19:21 +0100 Subject: [PATCH 1/4] PG-1013 Updated install steps for pg_tde The extension is now part of the server package, no need to install additional ones. Repo is no longer experimental modified: documentation/docs/apt.md modified: documentation/docs/yum.md --- documentation/docs/apt.md | 26 +++++++++++--------------- documentation/docs/yum.md | 33 +++++---------------------------- 2 files changed, 16 insertions(+), 43 deletions(-) diff --git a/documentation/docs/apt.md b/documentation/docs/apt.md index 7b0fcfbc..b0b9ec7b 100644 --- a/documentation/docs/apt.md +++ b/documentation/docs/apt.md @@ -8,7 +8,10 @@ This tutorial shows how to install `pg_tde` with [Percona Distribution for Postg ## Preconditions -You need the `percona-release` repository management tool that enables the desired Percona repository for you. +1. Debian and other systems that use the `apt` package manager include the upstream PostgreSQL server package (`postgresql-{{pgversion17}}`) by default. You need to uninstall this package before you install Percona Server for PostgreSQL and `pg_tde` to avoid conflicts. +2. You need the `percona-release` repository management tool that enables the desired Percona repository for you. + +## Install `percona-release` 1. You need the following dependencies to install `percona-release`: @@ -37,10 +40,10 @@ You need the `percona-release` repository management tool that enables the desir 4. Enable the Percona Distribution for PostgreSQL repository - 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. Since the `tde_heap` access method is still in the experimental stage, the `pg_tde` package is currently available from the experimental repository. + 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. ```{.bash data-prompt="$"} - $ sudo percona-release enable ppg-{{pgversion17}} experimental + $ sudo percona-release enable ppg-{{pgversion17}} ``` 6. Update the local cache @@ -51,21 +54,14 @@ You need the `percona-release` repository management tool that enables the desir ## Install `pg_tde` -After all [preconditions](#preconditions) are met, install the extension. +The `pg_tde` extension is a part of the `percona-postgresql-{{pgversion17}} package`. So you only need to install this package. -1. Install Percona Distribution for PostgreSQL. - - Run the following command to install Percona Distribution for PostgreSQL and the required packages: +After all [preconditions](#preconditions) are met, run the following command: - ```bash - sudo apt-get install -y percona-postgresql-17 percona-postgresql-contrib percona-postgresql-server-dev-all - ``` -2. Install `pg_tde` packages - - ```bash - sudo apt-get install percona-postgresql-17-pg-tde - ``` +```bash +sudo apt-get install -y percona-postgresql-17 +``` ## Next step diff --git a/documentation/docs/yum.md b/documentation/docs/yum.md index 4e83fdd5..e83f7a42 100644 --- a/documentation/docs/yum.md +++ b/documentation/docs/yum.md @@ -8,14 +8,6 @@ This tutorial shows how to install `pg_tde` with [Percona Distribution for Postg ## Preconditions -### Enable / disable modules - -For RHEL8/Oracle Linux 8/Rocky Linux 8, disable the ``postgresql`` and ``llvm-toolset``modules: - -```bash -sudo dnf module disable postgresql llvm-toolset -``` - ### Install `percona-release` You need the `percona-release` repository management tool that enables the desired Percona repository for you. @@ -29,31 +21,16 @@ You need the `percona-release` repository management tool that enables the desir 2. Enable the repository ```bash - sudo percona-release enable-only ppg-{{pgversion17}} experimental - ``` - -3. ### For `percona-postgresql{{pgversion}}-devel` package - -You need to install the `percona-postgresql{{pgversion}}-devel` package when working with pg_tde. This package requires dependencies that are not part of the Distribution, but can be installed from the specific repositories: - - ``` - $ sudo dnf config-manager --set-enabled ol9_codeready_builder + sudo percona-release enable-only ppg-{{pgversion17}} ``` ## Install `pg_tde` -1. Install Percona Distribution for PostgreSQL 17 and the required packages, run the following command: - - ```bash - sudo yum -y install percona-postgresql-client-common percona-postgresql-common percona-postgresql-server-dev-all percona-postgresql17 percona-postgresql17-contrib percona-postgresql17-devel percona-postgresql17-libs - ``` - -2. Install `pg_tde` packages - - ```bash - sudo yum install percona-pg_tde_17 - ``` +The `pg_tde` extension is a part of the `percona-postgresql{{pgversion17}} package`. So you only need to install this package. +```bash +sudo yum -y install percona-postgresql17 +``` ## Next steps From ce1383849d6fb0ae0df87f341aa5b35f1e49a056 Mon Sep 17 00:00:00 2001 From: Anastasia Alexadrova Date: Wed, 11 Dec 2024 18:05:23 +0100 Subject: [PATCH 2/4] Fixed repo type to enable --- documentation/docs/apt.md | 4 ++-- documentation/docs/yum.md | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/documentation/docs/apt.md b/documentation/docs/apt.md index b0b9ec7b..b27dc4d4 100644 --- a/documentation/docs/apt.md +++ b/documentation/docs/apt.md @@ -40,10 +40,10 @@ This tutorial shows how to install `pg_tde` with [Percona Distribution for Postg 4. Enable the Percona Distribution for PostgreSQL repository - 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. + 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. Since the extension is in the {{release}} stage, enable the testing repository. ```{.bash data-prompt="$"} - $ sudo percona-release enable ppg-{{pgversion17}} + $ sudo percona-release enable ppg-{{pgversion17}} testing ``` 6. Update the local cache diff --git a/documentation/docs/yum.md b/documentation/docs/yum.md index e83f7a42..c35cdb74 100644 --- a/documentation/docs/yum.md +++ b/documentation/docs/yum.md @@ -18,10 +18,12 @@ You need the `percona-release` repository management tool that enables the desir sudo yum -y install https://repo.percona.com/yum/percona-release-latest.noarch.rpm ``` -2. Enable the repository +2. Enable the repository. + + 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. Since the extension is in the {{release}} stage, enable the testing repository. ```bash - sudo percona-release enable-only ppg-{{pgversion17}} + sudo percona-release enable-only ppg-{{pgversion17}} testing ``` ## Install `pg_tde` From b737fc495ac1e5d285b3ab978d7e4e3a652fb36c Mon Sep 17 00:00:00 2001 From: Anastasia Alexadrova Date: Mon, 16 Dec 2024 13:19:36 +0100 Subject: [PATCH 3/4] Fixed repo type to enable --- documentation/docs/apt.md | 4 ++-- documentation/docs/yum.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/docs/apt.md b/documentation/docs/apt.md index b27dc4d4..6d97c4ef 100644 --- a/documentation/docs/apt.md +++ b/documentation/docs/apt.md @@ -40,10 +40,10 @@ This tutorial shows how to install `pg_tde` with [Percona Distribution for Postg 4. Enable the Percona Distribution for PostgreSQL repository - 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. Since the extension is in the {{release}} stage, enable the testing repository. + 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. ```{.bash data-prompt="$"} - $ sudo percona-release enable ppg-{{pgversion17}} testing + $ sudo percona-release enable ppg-{{pgversion17}} ``` 6. Update the local cache diff --git a/documentation/docs/yum.md b/documentation/docs/yum.md index c35cdb74..0b702f2f 100644 --- a/documentation/docs/yum.md +++ b/documentation/docs/yum.md @@ -20,10 +20,10 @@ You need the `percona-release` repository management tool that enables the desir 2. Enable the repository. - 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. Since the extension is in the {{release}} stage, enable the testing repository. + 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. ```bash - sudo percona-release enable-only ppg-{{pgversion17}} testing + sudo percona-release enable-only ppg-{{pgversion17}} ``` ## Install `pg_tde` From 1285963848826cf745a2f0e4868edb39fbd27755 Mon Sep 17 00:00:00 2001 From: Anastasia Alexadrova Date: Mon, 16 Dec 2024 15:52:56 +0100 Subject: [PATCH 4/4] PG-1260 Added a note to drop tde pacjage before installing the extension --- documentation/docs/apt.md | 16 ++++++++++++++-- documentation/docs/yum.md | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/documentation/docs/apt.md b/documentation/docs/apt.md index 6d97c4ef..a1ebc70c 100644 --- a/documentation/docs/apt.md +++ b/documentation/docs/apt.md @@ -54,9 +54,21 @@ This tutorial shows how to install `pg_tde` with [Percona Distribution for Postg ## Install `pg_tde` -The `pg_tde` extension is a part of the `percona-postgresql-{{pgversion17}} package`. So you only need to install this package. +!!! important -After all [preconditions](#preconditions) are met, run the following command: + The `pg_tde` {{release}} extension is a part of the `percona-postgresql-17` package. If you installed a previous version of `pg_tde` from the `percona-postgresql-17-pg-tde` package, do the following: + + * Drop the extension using the `DROP EXTENSION` with `CASCADE` command. + + :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). + + ```sql + DROP EXTENSION pg_tde CASCADE + ``` + + * Uninstall the `percona-postgresql-17-pg-tde` package. + +After all [preconditions](#preconditions) are met, run the following command to install `pg_tde`: ```bash diff --git a/documentation/docs/yum.md b/documentation/docs/yum.md index 0b702f2f..c4dfbc72 100644 --- a/documentation/docs/yum.md +++ b/documentation/docs/yum.md @@ -28,7 +28,20 @@ You need the `percona-release` repository management tool that enables the desir ## Install `pg_tde` -The `pg_tde` extension is a part of the `percona-postgresql{{pgversion17}} package`. So you only need to install this package. +!!! important + + The `pg_tde` {{release}} extension is a part of the `percona-postgresql17` package. If you installed a previous version of `pg_tde` from the `percona-pg_tde_17` package, do the following: + + * Drop the extension using the `DROP EXTENSION` with `CASCADE` command. + + :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). + + ```sql + DROP EXTENSION pg_tde CASCADE + ``` + + * Uninstall the `percona-pg_tde_17` package. + ```bash sudo yum -y install percona-postgresql17