public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ajin Cherian <[email protected]>
To: Shlok Kyal <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Álvaro Herrera <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Sergey Tatarintsev <[email protected]>
Cc: [email protected]
Subject: Re: Restrict publishing of partitioned table with a foreign table as partition
Date: Wed, 4 Jun 2025 20:41:59 +1000
Message-ID: <CAFPTHDYYq-Jx4RawpPNu78nq1TdPr7pZRWSdSm=eAejYr_wcag@mail.gmail.com> (raw)
In-Reply-To: <CANhcyEVUf5PEmahQvcc8GgCzxaAnJ8kTrir0Am_7O4SkZnpkQA@mail.gmail.com>
References: <CANhcyEVQ866NA5NbTi-aQhPj2zN_vbNb_ZW=E_P2foZYrW9VbA@mail.gmail.com>
<[email protected]>
<CAA4eK1KavSbVdk9OeQDV5yc0FVy_rFTam5HPozqYSoM=a=8hXg@mail.gmail.com>
<CANhcyEVUf5PEmahQvcc8GgCzxaAnJ8kTrir0Am_7O4SkZnpkQA@mail.gmail.com>
On Tue, May 20, 2025 at 2:33 AM Shlok Kyal <[email protected]> wrote:
>
> This approach seems better to me. I have created a patch with the
> above approach.
>
> Thanks and Regards,
> Shlok Kyal
Some quick comments on the patch:
1. In doc/src/sgml/ref/create_subscription.sgml:
+ has partitioned table with foreign table as partition. If this scenario is
+ detected we ERROR is logged to the user.
+ </para>
+
Should be: "If this scenario is detected an ERROR is logged to the
user." (remove "we").
In src/backend/commands/subscriptioncmds.c:
2. The comment header:
+ * This function is in charge of detecting if publisher with
+ * publish_via_partition_root=true publishes a partitioned table that has a
+ * foreign table as a partition.
Add "and throw an error if found" at the end of that sentence to
correctly describe what the function does.
3.
+ appendStringInfoString(&cmd,
+ "SELECT DISTINCT P.pubname AS pubname "
+ "from pg_catalog.pg_publication p, LATERAL "
+ "pg_get_publication_tables(p.pubname) gpt, LATERAL "
+ "pg_partition_tree(gpt.relid) gt JOIN
pg_catalog.pg_foreign_table ft ON "
+ "ft.ftrelid = gt.relid WHERE p.pubviaroot
= true AND p.pubname IN (");
use FROM rather than from to maintain SQL style consistency.
4.
+ errdetail_plural("The subscription being created on a
publication (%s) with publish_via_root_partition = true and contains
partitioned tables with foreign table as partition ",
+ "The subscription being created on
publications (%s) with publish_via_root_partition = true and contains
partitioned tables with foreign table as partition ",
+ list_length(publist), pubnames->data),
I think you meant "publish_via_partition_root" here and not
"publish_via_root_partition ".
regards,
Ajin Cherian
Fujitsu Australia
view thread (17+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Restrict publishing of partitioned table with a foreign table as partition
In-Reply-To: <CAFPTHDYYq-Jx4RawpPNu78nq1TdPr7pZRWSdSm=eAejYr_wcag@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox