8000 Create replication.md quick walkthrough for pg_tde by Andriciuc · Pull Request #319 · percona/postgres · GitHub
[go: up one dir, main page]

Skip to content

Create replication.md quick walkthrough for pg_tde #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Jun 25, 2025
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
72406c5
updated replication.md
Andriciuc May 8, 2025
dd248f4
Update replication.md
Andriciuc May 8, 2025
6d1f228
small fixes to text
Andriciuc May 8, 2025
486a1b0
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc May 19, 2025
449a781
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc May 20, 2025
e672241
Updated replication.md
Andriciuc May 21, 2025
55e2a57
Merge branch 'DOCS-create-replication.md' of https://github.com/perco…
Andriciuc May 21, 2025
d995bf3
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc May 21, 2025
6bf49ad
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc May 22, 2025
9e04c3d
updated replication.md with proper information
Andriciuc May 23, 2025
288fbe4
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc May 23, 2025
f27ba4d
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc May 23, 2025
7a94559
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc May 27, 2025
1451d7a
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 2, 2025
02333be
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 4, 2025
5edfd88 8000
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 4, 2025
c736a0d
Update replication.md
Andriciuc Jun 4, 2025
2652ab2
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 5, 2025
f704afa
Update replication.md
Andriciuc Jun 5, 2025
be718a5
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 5, 2025
6bca4af
Update replication.md
Andriciuc Jun 6, 2025
963c6bc
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 6, 2025
6e24fb9
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 6, 2025
d6863a4
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 9, 2025
0572b97
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 9, 2025
81f82f7
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 9, 2025
15bd921
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 9, 2025
aea50a2
Update replication.md
Andriciuc Jun 9, 2025
f37eecf
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 11, 2025
ef2540d
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 11, 2025
3c7e6f3
Update replication.md
Andriciuc Jun 11, 2025
3af26a7
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 12, 2025
9716803
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 12, 2025
24af28d
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 13, 2025
ed3ef1a
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 13, 2025
b8fa9f2
Merge branch 'TDE_REL_17_STABLE' into DOCS-create-replication.md
Andriciuc Jun 16, 2025
d15fff3
Merge branch 'release-17.5.2' into DOCS-create-replication.md
Andriciuc Jun 16, 2025
a9fb88e
Merge branch 'release-17.5.2' into DOCS-create-replication.md
Andriciuc Jun 18, 2025
6ef6038
Merge branch 'release-17.5.2' into DOCS-create-replication.md
Andriciuc Jun 19, 2025
b877cef
Merge branch 'release-17.5.2' into DOCS-create-replication.md
Andriciuc Jun 20, 2025
23189d7
updated based on latest feedback
Andriciuc Jun 25, 2025
817d133
Merge branch 'release-17.5.2' into DOCS-create-replication.md
Andriciuc Jun 25, 2025
e1bd244
Merge branch 'release-17.5.2' into DOCS-create-replication.md
Andriciuc Jun 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update replication.md
updated with feedback, removed global for configuring key providers, reordered the setup to ensure pg_tde is enabled and THEN create a key, small clarification updates
  • Loading branch information
Andriciuc committed Jun 6, 2025
commit 6bca4af9663c81a7de3298166c279a230bbc48f5
22 changes: 13 additions & 9 deletions contrib/pg_tde/documentation/docs/replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,28 @@ This section outlines how to set up PostgreSQL streaming replication when the `p

The following steps assume:

* You have enabled `pg_tde` and you have setup at least one active key on the **primary**.
* You have configured a global key provider for the **primary**, see [Configure Key Management (KMS)](global-key-provider-configuration/index.md) for more information.
* You have enabled `pg_tde`.
* You have configured a key provider for the **primary**, see [Configure Key Management (KMS)](global-key-provider-configuration/index.md) for more information.
* Ensure the certificate files are accessible for the standby, and that `pg_tde` is added to the shared preload libraries.

## 1. Configure the Primary

### Configure postgresql.conf

* Ensure you have configured `postgresql.conf`.
* Ensure you have configured the provider.
* Create the [principal key](functions#pg_tde_set_server_key_using_global_key_provider).
* Ensure you have configured `postgresql.conf` and that it contains the following line:

```ini
shared_preload_libraries = 'pg_tde'
```

* Ensure the extension is installed where it is needed:

```sql
CREATE EXTENSION IF NOT EXISTS pg_tde;
```

* Create the [principal key](functions#pg_tde_set_server_key_using_global_key_provider).

### Create the replication role

Ensure your primary has a replication role:
Expand All @@ -31,7 +36,7 @@ CREATE ROLE example_replicator WITH REPLICATION LOGIN PASSWORD 'example_password

### Configure pg_hba.conf

To connect to the replication server, add the following line in `pg_hba.conf`:
To allow the replica to connect to the primary server, add the following line in `pg_hba.conf`:

```conf
host replication example_replicator standby_ip/32 scram-sha-256
Expand All @@ -45,7 +50,7 @@ SELECT pg_reload_conf();

## 2. Configure the Standby

### Perform an encrypted database backup
### Perform a database backup

Run the base backup from your standby machine to pull the encrypted base backup:

Expand All @@ -64,11 +69,10 @@ pg_basebackup \

### Initial standby setup

* Ensure that in `postgresql.conf` or `postgresql.auto.conf`:
* Ensure that the following line is present in `postgresql.conf` or `postgresql.auto.conf`:

```ini
shared_preload_libraries = 'pg_tde'
hot_standby = on
```

## 3. Start and validate replication
Expand Down
0