Selectively invalidate caches in pgoutput when pg_namespace is modified - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject Selectively invalidate caches in pgoutput when pg_namespace is modified
Date
Msg-id OSCPR01MB14966D958533C269CE996E69AF5A72@OSCPR01MB14966.jpnprd01.prod.outlook.com
Whole thread Raw
List pgsql-hackers
Dear hackers,

This is a follow-up thread of [1]. I think it could be considered for
PG19 but let me share now.

Background
==========
Currently, all relsync cache entries would be discarded when the pg_namespace is
modified. This mechanism works well but is sometimes not efficient.
Theoretically, it is enough to invalidate entries which it belongs to the related
schema.

Patch overview
==============
Attached patch adds a new attribute for storing the hash value for pg_namespace.oid.
It would be set when the entry is created and used for the new syscache callback
function to check whether the entry is related.

At least this patch could pass tests on my env.

[1]:
https://www.postgresql.org/message-id/flat/OSCPR01MB14966C09AA201EFFA706576A7F5C92%40OSCPR01MB14966.jpnprd01.prod.outlook.com

Best regards,
Hayato Kuroda
FUJITSU LIMITED


Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: query_id: jumble names of temp tables for better pg_stat_statement UX
Next
From: Michael Paquier
Date:
Subject: Re: query_id: jumble names of temp tables for better pg_stat_statement UX