Skip to content

Commit

Permalink
PG-1013 Updated install steps for pg_tde (#378)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nastena1606 authored Dec 26, 2024
1 parent 1c11e68 commit cddb621
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
38 changes: 23 additions & 15 deletions documentation/docs/apt.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
42 changes: 17 additions & 25 deletions documentation/docs/yum.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand Down

0 comments on commit cddb621

Please sign in to comment.