git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 835d476)
Emit debug message when executing extension script.
Sat, 2 Jul 2022 18:20:45 +0000 (11:20 -0700)
Sat, 2 Jul 2022 18:29:55 +0000 (11:29 -0700)
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

diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c
index 7b3aceee119c5ffd7ad4f30c56f8a011eea5c2d9..3db859c3ea379b89fd231df2d4167354b9efb786 100644 (file)
--- 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
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /