Re: Skipping schema changes in publication - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Skipping schema changes in publication
Date
Msg-id CAA4eK1J=41eienWGzgAnB_-fAGjZdB2daP_N=84NSm1QT56YVQ@mail.gmail.com
Whole thread
In response to Re: Skipping schema changes in publication  (shveta malik <shveta.malik@gmail.com>)
List pgsql-hackers
On Wed, Feb 18, 2026 at 12:28 PM shveta malik <shveta.malik@gmail.com> wrote:
>
> On Wed, Feb 18, 2026 at 11:41 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > On Tue, Feb 17, 2026 at 5:08 PM shveta malik <shveta.malik@gmail.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.



pgsql-hackers by date:

Previous
From: Jakub Wartak
Date:
Subject: Add errdetail() with PID and UID about source of termination signal
Next
From: Amit Kapila
Date:
Subject: Re: [PATCH] Support automatic sequence replication