On Thu, Mar 13, 2025 at 12:00 AM Amit Kapila <akapila@postgresql.org> wrote:
> Avoid invalidating all RelationSyncCache entries on publication rename.
>
> On Publication rename, we need to only invalidate the RelationSyncCache
> entries corresponding to relations that are part of the publication being
> renamed.
>
> As part of this patch, we introduce a new invalidation message to
> invalidate the cache maintained by the logical decoding output plugin. We
> can't use existing relcache invalidation for this purpose, as that would
> unnecessarily cause relcache invalidations in other backends.
This seems like too much infrastructure for a niche optimization. If
there are plans to use this new invalidation message type to optimize
a bunch of other cases, then maybe it's worth it, but adding this just
to cover the presumably-rare case of ALTER PUBLICATION .. RENAME
doesn't seem worth it to me.
--
Robert Haas
EDB: http://www.enterprisedb.com