Patch attached.
Helpful for debugging complex extension script problems.
From b278eba9ba35ec1c52a8c1aa5c080a6731f86fbe Mon Sep 17 00:00:00 2001
From: Jeff Davis <[email protected]>
Date: Tue, 28 Jun 2022 12:06:03 -0700
Subject: [PATCH] Emit debug message when executing extension script.
Outputting script filenames helps extension authors understand which
upgrade path is followed when creating an extension.
---
src/backend/commands/extension.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c
index 767d9b96190..0b4d428f6bf 100644
--- a/src/backend/commands/extension.c
+++ b/src/backend/commands/extension.c
@@ -887,6 +887,8 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control,
filename = get_extension_script_filename(control, from_version, version);
+ ereport(DEBUG1, errmsg("executing extension script: %s", filename));
+
/*
* If installing a trusted extension on behalf of a non-superuser, become
* the bootstrap superuser. (This switch will be cleaned up automatically
--
2.17.1