Re: BUG #18683: A publication must be created *before* a logical rep slot in order to be used with that slot? - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: BUG #18683: A publication must be created *before* a logical rep slot in order to be used with that slot?
Date
Msg-id e3ff678a-4677-4869-856f-a876448b43f7@eisentraut.org
Whole thread Raw
In response to BUG #18683: A publication must be created *before* a logical rep slot in order to be used with that slot?  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On 01.11.24 19:09, PG Bug reporting form wrote:
> It seems that if you (1) create a logical replication slot (2) and activity
> happens in your database then (3) you create a publication, the combination
> of that slot + publication is not usable (you can't connect).
> 
> i.e. if there is any activity "in" a slot that predates the create statement
> for a pub, the slot+pub combo will not work.
> 
> Is this known behavior? It's surprising just insofar as I'd hope either:
> 
> - the docs cover this
> - the error message that one gets could be made clearer

Do the docs anywhere suggest you can do this?  The normal way to set up 
logical replication is to run CREATE SUBSCRIPTION, which makes the slot 
for you.  And CREATE SUBSCRIPTION requires specifying a publication, so 
it already has to exist beforehand.




pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18685: .pgpass is not enabled when running pg_basebackup on PostgreSQL 17.
Next
From: Greg Sabino Mullane
Date:
Subject: Re: BUG #18685: .pgpass is not enabled when running pg_basebackup on PostgreSQL 17.