Re: How is this possible "publication does not exist" - Mailing list pgsql-hackers

From Dave Cramer
Subject Re: How is this possible "publication does not exist"
Date
Msg-id CADK3HHJ6b06oQaatBrrQ+snxia81ALJPmCfmAbXkxp+3tAu53w@mail.gmail.com
Whole thread Raw
In response to Re: How is this possible "publication does not exist"  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers




On Wed, 11 Aug 2021 at 07:37, Amit Kapila <amit.kapila16@gmail.com> wrote:
On Wed, Aug 11, 2021 at 4:57 PM Dave Cramer <davecramer@gmail.com> wrote:
>
> On Wed, 11 Aug 2021 at 07:24, Amit Kapila <amit.kapila16@gmail.com> wrote:
>>
>> On Wed, Aug 11, 2021 at 1:18 AM Dave Cramer <davecramer@gmail.com> wrote:
>> >
>> > Reviving this thread
>> >
>> > 2021-08-10 19:05:09.096 UTC [3738] LOG:  logical replication apply worker for subscription "sub_mycluster_alltables" has started
>> > 2021-08-10 19:05:09.107 UTC [3739] LOG:  logical replication table synchronization worker for subscription "sub_mycluster_alltables", table "t_random" has started
>> > 2021-08-10 19:05:12.222 UTC [3739] LOG:  logical replication table synchronization worker for subscription "sub_mycluster_alltables", table "t_random" has finished
>> > 2021-08-10 19:05:14.806 UTC [3738] ERROR:  could not receive data from WAL stream: ERROR:  publication "sub_mycluster_alltables" does not exist
>> >         CONTEXT:  slot "sub_mycluster_alltables", output plugin "pgoutput", in the change callback, associated LSN 0/4015DF0
>> > 2021-08-10 19:05:14.811 UTC [175] LOG:  background worker "logical replication worker" (PID 3738) exited with exit code 1
>> >
>> >
>> > select * from pg_publication;
>> > -[ RECORD 1 ]+------------------------
>> > oid          | 16415
>> > pubname      | sub_mycluster_alltables
>> > pubowner     | 10
>> > puballtables | t
>> > pubinsert    | t
>> > pubupdate    | t
>> > pubdelete    | t
>> > pubtruncate  | t
>> >
>>
>> By any chance, did you dropped and recreated this publication as
>> mentioned in your first email? If so, I think this can happen because
>> of our use of historical snapshots to consult system catalogs.
>
>
> In this case, no.
>
> I am suspecting this error comes from pgoutput though.
>

I think it is and the context is generated via
output_plugin_error_callback. Is this reproducible for you and if so,
can you share a test case or some steps to reproduce this? Does this
work and suddenly start giving errors or it happens the very first
time you tried to set up publication/subscription? I think some more
details are required about your setup and steps to analyze this
problem. You might want to check publication-side logs but not sure if
get any better clue there.

In this case I am the messenger. I will try to get a repeatable test case.

Dave

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: How is this possible "publication does not exist"
Next
From: Dean Rasheed
Date:
Subject: Re: Use extended statistics to estimate (Var op Var) clauses