PG-1013 Updated install steps for pg_tde (#378)

* 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

* PG-1260 Added a note to drop tde pacjage before installing the extension
pull/209/head
Anastasia Alexandrova 9 months ago committed by GitHub
parent 1c11e68a87
commit cddb621e91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 38
      documentation/docs/apt.md
  2. 42
      documentation/docs/yum.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,26 @@ You need the `percona-release` repository management tool that enables the desir
## Install `pg_tde`
After all [preconditions](#preconditions) are met, install the extension.
!!! important
1. Install Percona Distribution for PostgreSQL.
Run the following command to install Percona Distribution for PostgreSQL and the required packages:
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:
```bash
sudo apt-get install -y percona-postgresql-17 percona-postgresql-contrib percona-postgresql-server-dev-all
```
* Drop the extension using the `DROP EXTENSION` with `CASCADE` command.
2. Install `pg_tde` packages
```bash
sudo apt-get install percona-postgresql-17-pg-tde
```
<i warning>:material-alert: Warning:</i> 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
sudo apt-get install -y percona-postgresql-17
```
## Next step

@ -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.
@ -26,34 +18,34 @@ 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.
```bash
sudo percona-release enable-only ppg-{{pgversion17}} experimental
sudo percona-release enable-only ppg-{{pgversion17}}
```
3. ### For `percona-postgresql{{pgversion}}-devel` package
## Install `pg_tde`
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:
!!! important
```
$ sudo dnf config-manager --set-enabled ol9_codeready_builder
```
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:
## Install `pg_tde`
* Drop the extension using the `DROP EXTENSION` with `CASCADE` command.
1. Install Percona Distribution for PostgreSQL 17 and the required packages, run the following command:
<i warning>:material-alert: Warning:</i> 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).
```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
```
```sql
DROP EXTENSION pg_tde CASCADE
```
* Uninstall the `percona-pg_tde_17` package.
2. Install `pg_tde` packages
```bash
sudo yum install percona-pg_tde_17
```
```bash
sudo yum -y install percona-postgresql17
```
## Next steps

Loading…
Cancel
Save