Re: Publication of same parent table with ONLY-ness mismatch should error

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Takeshi Ideriha <iderihatakeshi(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: Publication of same parent table with ONLY-ness mismatch should error
Date: 2026-10-20 03:29:55
Message-ID: CAJpy0uBm4FN87PE_Km9azG=FXCsWtDCWKqeEUf2AGfC6v7AQTA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 20, 2026 at 3:34 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> On Mon, Oct 19, 2026 at 6:11 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
> >
> ...
> >
> > Overall the patch looks good. But with so many 'relids' in play, it
> > takes time to figure out what each one represents. Do you think we
> > should also add below in the new comment:
> >
> > /*
> > * relids holds every relation added to the result so far, both those the
> > * user named and inheritance children added implicitly by recursion. It
> > * is used to filter out duplicates.
> > *
> > * relids_explicit holds only the relations the user actually named (a
> > * subset of relids). relids_recursing holds those explicitly named
> > * relations whose first mention did not specify ONLY. Together they are
> > * used to detect conflicting ONLY specifications for the same table.
> > */
> >
>
> Hi Shveta.
>
> I agree, your suggested code comment looks helpful.
>
> Added it in patch v3. PSA.
>

The comment looks good.

Should we also add tests for the EXCEPT clause, as it touches EXCEPT?

postgres=# create publication pub1 for all tables except(table only
testpub_tbl_parent, testpub_tbl_parent);
ERROR: conflicting ONLY specifications for table "testpub_tbl_parent"

thanks
Shveta

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-10-20 03:37:16 Re: [PATCH] Fix typos in comments
Previous Message Michael Paquier 2026-10-20 03:28:47 Re: pgstat: don't assert on dropped entries when writing stats file