Re: Selectively invalidate caches in pgoutput module

r.zharkov@postgrespro.ru

From: Zharkov Roman <r.zharkov@postgrespro.ru>
To: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Cc: pgsql-hackers@lists.postgresql.org, Amit Kapila <amit.kapila16@gmail.com>, "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, ShlokKumar.Kyal@fujitsu.com, Masahiko Sawada <sawada.mshk@gmail.com>
Date: 2026-01-16T14:18:48Z
Lists: pgsql-hackers
Hello,

It seems I found the not corresponding comment "CallSyscacheCallbacks" 
on the function "CallRelSyncCallbacks(Oid relid)"  [1].
This is from commit #3abe9dc [2].

On Monday, March 03, 2025 14:57 +07, "Hayato Kuroda (Fujitsu)" 
<kuroda.hayato@fujitsu.com> wrote:

> Hi, this is a fork thread from [1]. I want to propose a small 
> optimization for
> logical replication system.

[1] 
https://github.com/postgres/postgres/blob/master/src/backend/utils/cache/inval.c#L1917C4-L1917C25
[2] 
https://github.com/postgres/postgres/commit/3abe9dc18892b9f69bb48a2eb21fbe5cf348a489#diff-a2d058b87a058c0877ab30776da08a5b884944ece132cbbdf916ec06c29611fdR1903

--
Roman Zharkov



Commits

  1. Avoid invalidating all RelationSyncCache entries on publication rename.

  2. Avoid invalidating all RelationSyncCache entries on publication change.