Re: pgsql: Avoid invalidating all RelationSyncCache entries on publication - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pgsql: Avoid invalidating all RelationSyncCache entries on publication
Date
Msg-id CA+Tgmoa+GkGNZ86QmqyuOCHWaBkOEJAEPfghEQ1d8_+KudVknw@mail.gmail.com
Whole thread Raw
Responses Re: pgsql: Avoid invalidating all RelationSyncCache entries on publication
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: libpq: Process buffered SSL read bytes to support records >8kB on async API
Next
From: Bertrand Drouvot
Date:
Subject: Re: Draft for basic NUMA observability