0

I am trying to set up logical replication between two databases (deployed via kubernetes).

On the origin database, I created a logical replication slot as follows:

SELECT pg_create_logical_replication_slot('sub_test', 'pgoutput')

and a publication

CREATE PUBLICATION pub FOR TABLE "AOI"

On my subscriber db, I create the subscription

CREATE SUBSCRIPTION sub_test CONNECTION 'postgresql://user:password@localhost:5432/postgres' 
PUBLICATION pub 
WITH (slot_name=sub_test, create_slot=false, copy_data=True)

However, in the logs for my subscriber database, I am seeing:

2024-05-30 15:49:46.654 UTC [2883] ERROR:  replication slot "sub_test" does not exist 
2024-05-30 15:49:46.654 UTC [2883] STATEMENT:  START_REPLICATION SLOT "sub_test" LOGICAL 0/0 (proto_version '1', publication_names '"pub"')
2024-05-30 15:49:46.654 UTC [2881] ERROR:  could not start WAL streaming: ERROR:  replication slot "sub_test" does not exist

Why does the replication slot not exist, when I have just created it? I am new to this and do not totally understand what the error is meant to tell me.

jm22b
  • 101
  • 2

0 Answers0