Re: Skipping schema changes in publication

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(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-02-18 07:39:08
Message-ID: CAA4eK1J=41eienWGzgAnB_-fAGjZdB2daP_N=84NSm1QT56YVQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 18, 2026 at 12:28 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> On Wed, Feb 18, 2026 at 11:41 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Tue, Feb 17, 2026 at 5:08 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
> > >
> > > A few more:
> > >
> > > 6)
> > > postgres=# CREATE PUBLICATION pub4 for ALL TABLES EXCEPT TABLE (tab1);
> > > ERROR: cannot add relation "tab1" to publication
> > > DETAIL: This operation is not supported for temporary tables.
> > >
> > > postgres=# CREATE PUBLICATION pub4 for ALL TABLES EXCEPT TABLE (tab2);
> > > ERROR: cannot add relation "tab2" to publication
> > > DETAIL: This operation is not supported for unlogged tables.
> > >
> > > Shall we change the error message here as we are not trying to add
> > > relation here.
> > >
> >
> > But aren't these existing messages? As these are not added by this
> > patch and equally apply to existing code, so, isn't it better to
> > discuss these separately if you think these are not suitable?
> >
>
> I do not have strong opinion here but this is what I originally had in mind:
>
> 1) 'cannot add relation .. to publication' is confusing when the user
> is actually trying to exclude them.
> 2) Since these tables are already excluded because of their unlogged
> and temporary nature, the error is further misleading.
>
> Perhaps we shall have:
> ERROR: cannot specify relation "tab1" in publication
> DETAIL: Unlogged tables are automatically excluded from publication.
>

Your proposed message for this case sounds good to me.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-02-18 07:41:48 Re: [PATCH] Support automatic sequence replication
Previous Message Jakub Wartak 2026-02-18 07:32:25 Add errdetail() with PID and UID about source of termination signal