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

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: accomazz(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18683: A publication must be created *before* a logical rep slot in order to be used with that slot?
Date: 2024-11-04 09:56:56
Message-ID: e3ff678a-4677-4869-856f-a876448b43f7@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Greg Sabino Mullane 2024-11-04 16:18:56 Re: BUG #18685: .pgpass is not enabled when running pg_basebackup on PostgreSQL 17.
Previous Message PG Bug reporting form 2024-11-04 07:58:08 BUG #18685: .pgpass is not enabled when running pg_basebackup on PostgreSQL 17.