Re: Skipping schema changes in publication

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Andrei Lepikhov <lepihov(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, YeXiu <1518981153(at)qq(dot)com>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Skipping schema changes in publication
Date: 2026-03-09 10:53:37
Message-ID: CALDaNm0=PhFy8jQuDGe0JguXWWvxVNb5hp2+h9JauH3d9w-ceg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 9 Mar 2026 at 13:04, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Mon, Mar 9, 2026 at 8:22 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > The attached v59 patch has the changes to update the syntax accordingly.
> >
>
> Creation of FOR ALL TABLES publications requires superuser privileges.
> See following code in CreatePublication()
>
> ---
> /* FOR ALL TABLES and FOR ALL SEQUENCES requires superuser */
> if (!superuser())
> {
> if (stmt->for_all_tables || stmt->for_all_sequences)
> ereport(ERROR,
> errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
> errmsg("must be superuser to create a FOR ALL TABLES or ALL SEQUENCES
> publication"));
> }
> ---
>
> Similarly, won't altering them also require the superuser privilege? I
> don't see the corresponding code in the patch.

This is addressed in the v60 version patch attached.
Also Nisha's comments from [1] and Shveta's comments from [2] are
handled in the v60 version.

[1] - https://www.postgresql.org/message-id/CABdArM65WySkXh0KSTdpX2cxKEPBdGGTt693vhpgAdW-uH97JQ%40mail.gmail.com
[2] - https://www.postgresql.org/message-id/CAJpy0uAWyaorY4NzreVM5hURQYY7hKpj%3Dc8dWziF3GBkFDvLJw%40mail.gmail.com

Regards,
Vignesh

Attachment Content-Type Size
v60-0001-Support-SET-ALL-TABLES-EXCEPT-TABLE-in-ALTER-PUB.patch application/octet-stream 26.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shin Berg 2026-03-09 11:02:56 Re: Inconsistency in owner assignment between INDEX and STATISTICS
Previous Message Antonin Houska 2026-03-09 10:43:44 Re: Adding REPACK [concurrently]