| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | shveta malik <shveta(dot)malik(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Review items for EXCEPT TABLE publication |
| Date: | 2026-09-10 11:18:52 |
| Message-ID: | CAA4eK1KHA-mkvtRPKsE-er8ePOnEu59_hxApaQKtr2=2GNOEQA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Sep 10, 2026 at 4:25 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>
> >
> > I had given a similar comment offlist yesterday, but upon rethinking,
> > I feel automatically removing the table from the EXCEPT list is
> > slightly riskier even with NOTICE given. The user may later change the
> > table back to LOGGED, in which case the publication semantics would
> > have changed silently; the table would now be published(for ALL TABLEs
> > case) even though the user never changed the publication
> > configuration.
> >
>
> I actually considered that before I raised the comment. Now, to set a table unlogged, a user has to remove it from the EXPECT list manually, then if he sets the table logged again, the table will be published also, unless he remembers to move the table to the EXCEPT list again. So ends up the same result.
>
But if She explicitly removes it from the EXCEPT list then it will be
the user's responsibility to add it again. This is better than a
silent behavior.
> If we want to allow users to freely toggle logged/unlogged, maybe we need to leave unlogged table in EXPECT list.
>
The biggest challenge with this is to have a dangling entry in
pg_publication_rel. If nothing else, the callers of
GetExcludedPublicationTables() should be careful that it can contain
unlogged relations. The existing callers are immune to this but all
the future callers need to be aware of the same and may need
additional handling. I feel this approach to fix the issue is doable
but adds more maintenance burden.
--
With Regards,
Amit Kapila.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Xuneng Zhou | 2026-09-10 11:31:06 | Re: Improve WAIT FOR read-your-writes consistency doc |
| Previous Message | vignesh C | 2026-09-10 11:12:47 | Re: Review items for EXCEPT TABLE publication |