On Thu, Sep 10, 2026 at 4:25 PM Chao Li <[email protected]> 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.
