Re: create subscription with (origin = none, copy_data = on)

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Sergey Tatarintsev <s(dot)tatarintsev(at)postgrespro(dot)ru>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: create subscription with (origin = none, copy_data = on)
Date: 2025-01-18 05:01:27
Message-ID: CALDaNm0x=Lf8iz4WqR9U2474jzT0VmwTBeXB5LjBa7T3UPX-zg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 17 Jan 2025 at 21:30, vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Fri, 17 Jan 2025 at 14:00, Sergey Tatarintsev
> <s(dot)tatarintsev(at)postgrespro(dot)ru> wrote:
> >
> > Hi, hackers!
> >
> > I am looking at subscription creation command:
> >
> > CREATE SUBSCRIPTION sub CONNECTION '...' PUBLICATION pub WITH (origin =
> > none, copy_data = on);
> >
> > For now we log a warning if the publisher has subscribed to the same
> > table from some other publisher.
> > However, in case of publication with publish_via_partition_root option,
> > we will not raise such warinigs
> > because SQL command in check_publications_origin() checks only directly
> > published tables.
>
> Yes, I agree that we are checking only the directly published tables
> which is why there is no warning in this case. I'm working on a fix to
> change the check_publications_origin to check accordingly.

Attached patch has the fix for this issue which includes the partition
tables also for the publication now and throws a warning
appropriately.

Regards,
Vignesh

Attachment Content-Type Size
0001-Fix-origin-warning-not-thrown-for-publications-on-pa.patch text/x-patch 5.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Junwang Zhao 2025-01-18 05:49:23 Re: rename es_epq_active to es_epqstate
Previous Message Zhijie Hou (Fujitsu) 2025-01-18 03:45:13 RE: Conflict detection for update_deleted in logical replication