From e7f5d3743a773bb8fc08bf5180d0e40d47ada624 Mon Sep 17 00:00:00 2001 From: Alex Chi Z Date: Mon, 12 Feb 2024 15:24:39 -0500 Subject: [PATCH] fix superuser permission check for extensions Signed-off-by: Alex Chi Z --- src/backend/commands/extension.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index 74cc7379e77..33d29db81c8 100644 --- a/src/backend/commands/extension.c +++ b/src/backend/commands/extension.c @@ -874,7 +874,7 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control, * here so that the control flags are correctly associated with the right * script(s) if they happen to be set in secondary control files. */ - if (control->superuser && !superuser()) + if (control->superuser && !superuser() && !is_neon_superuser()) { if (extension_is_trusted(control)) switch_to_superuser = true;