summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Davis2022-07-02 18:20:45 +0000
committerJeff Davis2022-07-02 18:29:55 +0000
commit43470717c47092194832b90737dc74ec6ab9ef33 (patch)
tree4f8bc2395af7ace35bf9d27763def471cbf00397
parent835d476fd21bcfb60b055941dee8c3d9559af14c (diff)
Emit debug message when executing extension script.
Allows extension authors to more easily debug problems related to the sequence of update scripts that are executed. Discussion: https://postgr.es/m/5636a7534a4833884172fe4369d825b26170b3cc.camel%40j-davis.com Reviewed-by: Peter Eisentraut, Nathan Bossart
-rw-r--r--src/backend/commands/extension.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c
index 7b3aceee11..3db859c3ea 100644
--- a/src/backend/commands/extension.c
+++ b/src/backend/commands/extension.c
@@ -887,6 +887,11 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control,
filename = get_extension_script_filename(control, from_version, version);
+ if (from_version == NULL)
+ elog(DEBUG1, "executing extension script for \"%s\" version '%s'", control->name, version);
+ else
+ elog(DEBUG1, "executing extension script for \"%s\" update from version '%s' to '%s'", control->name, from_version, version);
+
/*
* If installing a trusted extension on behalf of a non-superuser, become
* the bootstrap superuser. (This switch will be cleaned up automatically