From da0a002962ec227b3d8d257cf2698e1f46bcf48b Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Thu, 19 Sep 2024 11:11:41 +0200 Subject: [PATCH] PG-1036 Invoke previous object access hook (#284) --- src/access/pg_tde_ddl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/access/pg_tde_ddl.c b/src/access/pg_tde_ddl.c index bb614e90..a4459ea8 100644 --- a/src/access/pg_tde_ddl.c +++ b/src/access/pg_tde_ddl.c @@ -17,14 +17,14 @@ #include "access/pg_tde_tdemap.h" -static object_access_hook_type old_objectaccess_hook = NULL; +static object_access_hook_type prev_object_access_hook = NULL; static void tdeheap_object_access_hook(ObjectAccessType access, Oid classId, Oid objectId, int subId, void *arg); void SetupTdeDDLHooks(void) { - old_objectaccess_hook = object_access_hook; + prev_object_access_hook = object_access_hook; object_access_hook = tdeheap_object_access_hook; } @@ -32,6 +32,9 @@ static void tdeheap_object_access_hook(ObjectAccessType access, Oid classId, Oid objectId, int subId, void *arg) { + if (prev_object_access_hook) + prev_object_access_hook(access, classId, objectId, subId, arg); + Relation rel = NULL; if (access == OAT_DROP && classId == RelationRelationId) {