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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: operations i <ioperations(dot)c(at)gmail(dot)com>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: How is this possible "publication does not exist"
Date: 2022-05-24 04:13:46
Message-ID: CAA4eK1KhL+TeVrKUVpScrq3PP5WCLWU6AyaVdnm__N9yBDAWgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

On Tue, May 24, 2022 at 7:51 AM operations i <ioperations(dot)c(at)gmail(dot)com>
wrote:

> I have found this topic (
> https://www.postgresql.org/message-id/89b22955-bf9f-f7f2-9620-fbe2e4766a18%402ndquadrant.com
> )
> cause I have the same problem in my environment, and I'd like to continue
> the story .
> it seems the problem will definitely occur when start the script.
> find an empty directory and start the script .
>

The problem is due to the reason that the slot used for sending changes to
the subscription is created before publication. So, when we decode the
changes (in your case 'insert') and check the respective publication, it
won't exist by that time. The same problem is being discussed in a
slightly different context in the email [1]. As a workaround, if you create
a slot after creating a publication, you should not see this error.

[1] -
https://www.postgresql.org/message-id/CAHut%2BPvMbCsL8PAz1Qc6LNoL0Ag0y3YJtPVJ8V0xVXJOPb%2B0xw%40mail.gmail.com

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2022-05-24 08:19:24 BUG #17492: error MSB4126: The specified solution configuration "Release|arm64" is invalid
Previous Message John Naylor 2022-05-24 03:41:34 Re: BUG #17491: PgAgent keeps failing

Browse pgsql-general by date

  From Date Subject
Next Message jian he 2022-05-24 05:02:25 cast to domain with default collation issue.
Previous Message operations i 2022-05-24 02:34:36 Fwd: How is this possible "publication does not exist"