Replica fails replicating keyring and keys creation

Description

  1. Create a primary server

  2. Create a replica

  3. On primary: CREATE EXTENSION IF NOT EXISTS pg_tde;

  4. On primary SELECT pg_tde_add_key_provider_file('local_keyring','/tmp/pg_tde_local_keyring.file');

Replica will fail with

FATAL: could not open tde file "pg_tde/pg_tde_16384_keyring": No such file or directory CONTEXT: WAL redo at 0/3068468 for test_tdeheap_custom_rmgr/UNKNOWN (40): add key provider local_keyring for 16384

This is due to redo of CREATE EXTENSION pg_tde; doesn’t create `pg_tde` dir. But it should

Environment

None

Activity

Show:

mohit.joshi last week

commit e3cd93bd9f05c792748af4ef0c04b414c324ed87
Author: Andrew Pogrebnoi absourd.noise@gmail.com
Date: Tue Mar 18 14:34:59 2025 +0200

Create pg_tde dir on replicas (#149) Otherwise `pg_tde_add_key_provider...` fill fail if a replica was created before primary run `CREATE EXTENSION pg_tde` Fixes PG-1489

The bug fix has been verified successfully. Marking this ticket as “Done”

Done

Details

Assignee

Reporter

Needs QA

Yes

Components

Sprint

Fix versions

Priority

Smart Checklist

Created March 18, 2025 at 11:20 AM
Updated last week
Resolved last week

Flag notifications