Re: How is this possible "publication does not exist"

From: Dave Cramer <davecramer(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How is this possible "publication does not exist"
Date: 2019-12-19 18:15:20
Message-ID: CADK3HHJSR+CoY8WW+AgQQMwGTbppaEOEmCo2hiv7YGobf-_LPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 19 Dec 2019 at 11:59, Dave Cramer <davecramer(at)gmail(dot)com> wrote:

> The publication exists but for some reason the function can't find it
>
> SELECT * FROM pg_logical_slot_get_binary_changes('debezium', NULL,
> NULL,'proto_version','1','publication_names','dbz_publication');
> ERROR: publication "dbz_publication" does not exist
> CONTEXT: slot "debezium", output plugin "pgoutput", in the change
> callback, associated LSN 0/307D8E8
> postgres=# select * from pg_publication;
> pubname | pubowner | puballtables | pubinsert | pubupdate |
> pubdelete | pubtruncate
>
> -----------------+----------+--------------+-----------+-----------+-----------+-------------
> dbz_publication | 10 | t | t | t | t
> | t
> (1 row)
>
> postgres=# SELECT * FROM pg_logical_slot_get_binary_changes('debezium',
> NULL, NULL,'proto_version','1','publication_names','dbz_publication');
> ERROR: publication "dbz_publication" does not exist
> CONTEXT: slot "debezium", output plugin "pgoutput", in the change
> callback, associated LSN 0/307D8E8
>

It seems that if you drop the publication on an existing slot it needs to
be recreated. Is this expected behaviour

drop publication dbz_publication ;
DROP PUBLICATION
postgres=# create publication dbz_publication for all tables;
CREATE PUBLICATION
postgres=# SELECT * FROM pg_logical_slot_get_binary_changes('debezium',
NULL, NULL,'proto_version','1','publication_names','dbz_publication');
ERROR: publication "dbz_publication" does not exist
CONTEXT: slot "debezium", output plugin "pgoutput", in the change
callback, associated LSN 0/4324180

Dave Cramer

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-12-19 18:19:56 Re: How is this possible "publication does not exist"
Previous Message Peter Geoghegan 2019-12-19 18:05:18 Re: [PATCH] Remove twice assignment with var pageop (nbtree.c).