| From: | Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> |
|---|---|
| To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
| Cc: | shveta malik <shveta(dot)malik(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Support EXCEPT for TABLES IN SCHEMA publications |
| Date: | 2026-07-08 15:22:17 |
| Message-ID: | CABdArM7LQwrYG7yLdY730oquvSN8tyjH5_EKWH1thF7R6jWHhw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Jul 6, 2026 at 1:25 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> Hi Nisha.
>
> Some review comments for v18.
>
> //////////
> Patch v18-0001
> //////////
...
>
> ~
>
> 1b.
> Why hint to change the except list -- who says the EXCEPT list is wrong?
>
> It seemed more like a user error to me if they are trying to drop
> something from a publication when it is already excluded. Why does
> this need any hint at all?
Okay, I see your point. The intent of the hint was to guide users who
are actually trying to remove a table from the EXCEPT list by pointing
them to SET.
I've reworded it to:
HINT: Use ALTER PUBLICATION ... SET TABLES IN SCHEMA ... EXCEPT to
drop the table from the EXCEPT list.
Hopefully this is clearer and more helpful. Let me know if this works,
or if you still think no hint is the better option.
>
> ======
> src/test/regress/sql/publication.sql
>
> 2.
> I did not recognise the distinction in the test comments between
> "fail:" and "error:".
>
Fixed. I now use "fail" consistently throughout.
...
>
> //////////
> Patch v18-0004
> //////////
>
> doc/src/sgml/ref/create_publication.sgml
>
> 1.
> <para>
> For partitioned tables, only the root partitioned table may be specified
> in <literal>EXCEPT</literal>. Doing so excludes the root table and
> - all of its partitions from replication. The optional
> + all of its partitions from replication, even any partition that lives
> + in a schema which is itself included in the publication.
>
> BEFORE
> For partitioned tables, only the root partitioned table may be
> specified in EXCEPT. Doing so excludes the root table and all of its
> partitions from replication, even any partition that lives in a schema
> which is itself included in the publication.
>
> SUGGESTION #1
> For partitioned tables, only the root partitioned table may be
> specified in EXCEPT. Excluding the root table automatically excludes
> all of its partitions from replication, including those in schemas
> that are otherwise included in the publication.
>
> SUGGESTION #2 (TI doubt you even needed to mention about other schemas)
> For partitioned tables, only the root partitioned table may be
> specified in EXCEPT. Excluding the root table automatically excludes
> all of its partitions from replication, including those that would
> otherwise be included in the publication.
>
I lean towards Suggestion #1, as not publishing a table/partition when
its schema is published without any exception is a non-obvious case
and should be stated explicitly.
--
Thanks,
Nisha
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nisha Moond | 2026-07-08 15:22:45 | Re: Support EXCEPT for TABLES IN SCHEMA publications |
| Previous Message | Nisha Moond | 2026-07-08 15:20:25 | Re: Support EXCEPT for TABLES IN SCHEMA publications |