public inbox for [email protected]  
help / color / mirror / Atom feed
From: Hayato Kuroda (Fujitsu) <[email protected]>
To: 'Zharkov Roman' <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Zhijie Hou (Fujitsu) <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Masahiko Sawada <[email protected]>
Subject: RE: Selectively invalidate caches in pgoutput module
Date: Thu, 19 Feb 2026 13:06:34 +0000
Message-ID: <OS9PR01MB12149FB960231146195E5B7BDF56BA@OS9PR01MB12149.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <[email protected]>
References: <OSCPR01MB14966C09AA201EFFA706576A7F5C92@OSCPR01MB14966.jpnprd01.prod.outlook.com>
	<[email protected]>

Dear Zharkov,

Sorry for the very late reply, I completely missed.

After considering bit more, we may be able to remove CallRelSyncCallbacks() function
in the first place. There is only a caller for now and I cannot come up with the case
where we want to call callbacks without the invalidations from other sides.

Best regards,
Hayato Kuroda
FUJITSU LIMITED



Attachments:

  [application/octet-stream] 0001-Remove-unnecessary-function.patch (1.9K, ../OS9PR01MB12149FB960231146195E5B7BDF56BA@OS9PR01MB12149.jpnprd01.prod.outlook.com/2-0001-Remove-unnecessary-function.patch)
  download | inline diff:
From c57024901d3b3debbeff4e07aec00e1b6541550e Mon Sep 17 00:00:00 2001
From: Hayato Kuroda <[email protected]>
Date: Thu, 19 Feb 2026 21:53:55 +0900
Subject: [PATCH] Remove unnecessary function

---
 src/backend/utils/cache/inval.c | 23 ++++++++---------------
 src/include/utils/inval.h       |  2 --
 2 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index d59216b28f1..39a5b132f4d 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -895,7 +895,14 @@ LocalExecuteInvalidationMessage(SharedInvalidationMessage *msg)
 	{
 		/* We only care about our own database */
 		if (msg->rs.dbId == MyDatabaseId)
-			CallRelSyncCallbacks(msg->rs.relid);
+		{
+			for (int i = 0; i < relsync_callback_count; i++)
+			{
+				struct RELSYNCCALLBACK *ccitem = relsync_callback_list + i;
+
+				ccitem->function(ccitem->arg, msg->rs.relid);
+			}
+		}
 	}
 	else
 		elog(FATAL, "unrecognized SI message ID: %d", msg->id);
@@ -1913,20 +1920,6 @@ CallSyscacheCallbacks(SysCacheIdentifier cacheid, uint32 hashvalue)
 	}
 }
 
-/*
- * CallSyscacheCallbacks
- */
-void
-CallRelSyncCallbacks(Oid relid)
-{
-	for (int i = 0; i < relsync_callback_count; i++)
-	{
-		struct RELSYNCCALLBACK *ccitem = relsync_callback_list + i;
-
-		ccitem->function(ccitem->arg, relid);
-	}
-}
-
 /*
  * LogLogicalInvalidations
  *
diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h
index 5f64fb20477..e83f25d28f1 100644
--- a/src/include/utils/inval.h
+++ b/src/include/utils/inval.h
@@ -95,8 +95,6 @@ extern void CacheRegisterRelSyncCallback(RelSyncCallbackFunction func,
 
 extern void CallSyscacheCallbacks(SysCacheIdentifier cacheid, uint32 hashvalue);
 
-extern void CallRelSyncCallbacks(Oid relid);
-
 extern void InvalidateSystemCaches(void);
 extern void InvalidateSystemCachesExtended(bool debug_discard);
 
-- 
2.47.3



view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: RE: Selectively invalidate caches in pgoutput module
  In-Reply-To: <OS9PR01MB12149FB960231146195E5B7BDF56BA@OS9PR01MB12149.jpnprd01.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox