Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit490f869

Browse files
committed
Create syscache entries for pg_extension
Two syscache identifiers are added for extension names and OIDs.Shared libraries of extensions might want to invalidate or update theirown caches whenever a CREATE, ALTER or DROP EXTENSION command is run fortheir extension (in any backend). Right now this is non-trivial to docorrectly and efficiently, but, if an extension catalog is part of asyscache, this could simply be done by registering an callback usingCacheRegisterSyscacheCallback for the relevant syscache.Another case where this is useful is a loaded library where some of itscode paths rely on some objects of the extension to exist; it can besimpler and more efficient to do an existence check directly on theextension through the syscache.Author: Jelte Fennema-NioReviewed-by: Alexander Korotkov, Pavel StehuleDiscussion:https://postgr.es/m/CAGECzQTWm9sex719Hptbq4j56hBGUti7J9OWjeMobQ1ccRok9w@mail.gmail.com
1 parenta839567 commit490f869

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/include/catalog/pg_extension.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,7 @@ DECLARE_TOAST(pg_extension, 4147, 4148);
5656
DECLARE_UNIQUE_INDEX_PKEY(pg_extension_oid_index,3080,ExtensionOidIndexId,pg_extension,btree(oidoid_ops));
5757
DECLARE_UNIQUE_INDEX(pg_extension_name_index,3081,ExtensionNameIndexId,pg_extension,btree(extnamename_ops));
5858

59+
MAKE_SYSCACHE(EXTENSIONOID,pg_extension_oid_index,2);
60+
MAKE_SYSCACHE(EXTENSIONNAME,pg_extension_name_index,2);
61+
5962
#endif/* PG_EXTENSION_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp