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
0001-Avoid-invalidating-all-entries-when-pg_namespace-is-.patch
Description: 0001-Avoid-invalidating-all-entries-when-pg_namespace-is-.patch