Re: Emit extra debug message when executing extension script.

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Emit extra debug message when executing extension script.
Date: 2022-07-02 18:39:04
Message-ID: 8e4e1d3c330828abe73b9a587607587ad87539c9.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2022-07-01 at 15:33 -0700, Nathan Bossart wrote:
> On Fri, Jul 01, 2022 at 03:24:27PM -0700, Jeff Davis wrote:
> > + ereport(DEBUG1, errmsg("executing extension update
> > script from version '%s' to '%s'", from_version, version));
>
> nitpick: I would suggest "executing extension script for update from
> version X to Y."

Thank you. Committed with minor modification to include the extension
name.

I did end up using Peter's suggestion. I reviewed other DEBUG messages
and it seems nearly all use elog() or errmsg_internal().

> I personally would rather this output the name of the file. If
> revealing
> the directory is a concern, perhaps we could just trim everything but
> the
> file name.

I could have slightly refactored the code to do this, but it didn't
quite seem worth it for a single debug message.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-07-02 18:53:34 Re: Probable memory leak with ECPG and AIX
Previous Message Andres Freund 2022-07-02 18:33:54 AIX support - alignment issues