From: | vignesh C <vignesh21(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Sergey Tatarintsev <s(dot)tatarintsev(at)postgrespro(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: create subscription with (origin = none, copy_data = on) |
Date: | 2025-01-20 17:30:45 |
Message-ID: | CALDaNm1m53OZuVb3MbyYMnDkY7VPz_inJ9kJAPEW-OC503646w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 20 Jan 2025 at 17:31, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Sat, Jan 18, 2025 at 10:31 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > Attached patch has the fix for this issue which includes the partition
> > tables also for the publication now and throws a warning
> > appropriately.
> >
>
> The corresponding query (see "To find which tables might potentially
> include non-local origins .." on [1]) on the create_subscription doc
> page.
Modified this too
> *
> @@ -1147,10 +1151,12 @@ pg_get_publication_tables(PG_FUNCTION_ARGS)
> *schemarelids;
>
> relids = GetPublicationRelations(pub_elem->oid,
> + allparttables ? PUBLICATION_PART_ALL :
> pub_elem->pubviaroot ?
> PUBLICATION_PART_ROOT :
> PUBLICATION_PART_LEAF);
> schemarelids = GetAllSchemaPublicationRelations(pub_elem->oid,
> + allparttables ? PUBLICATION_PART_ALL :
> pub_elem->pubviaroot ?
> PUBLICATION_PART_ROOT :
> PUBLICATION_PART_LEAF);
>
> Don't we need to add similar handling FOR ALL TABLES case? If not, why?
Yes, it is required. Modified
> BTW, the proposed fix is not backpatcheable as it changes the catalog
> which requires catversion bump. However, as this is a WARNING case, if
> we can't find a fix that can't be backpatched, we can fix it in
> HEAD-only.
I could not find a way to fix the back version without changing the
catalog version.
The attached v3 version has the changes for the same.
Regards,
Vignesh
Attachment | Content-Type | Size |
---|---|---|
v3-0001-Fix-origin-warning-not-thrown-for-publications-on.patch | text/x-patch | 8.3 KB |
v3-0002-Fix-origin-warning-not-thrown-for-publications-on.patch | text/x-patch | 13.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bernd Helmle | 2025-01-20 17:41:42 | Re: Modern SHA2- based password hashes for pgcrypto |
Previous Message | Álvaro Herrera | 2025-01-20 17:23:47 | Re: Bug in detaching a partition with a foreign key. |