From: Jeff Davis Date: Sat, 2 Jul 2022 18:20:45 +0000 (-0700) Subject: Emit debug message when executing extension script. X-Git-Tag: REL_16_BETA1~2375 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=43470717c47092194832b90737dc74ec6ab9ef33;p=postgresql.git 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 --- diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index 7b3aceee119..3db859c3ea3 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