[pkg-bacula-devel] Bug#1100649: bacula-director-pgsql: Upgrade wants database extension but doesn't have permission

Carsten Leonhardt leo at debian.org
Fri Mar 28 02:18:22 GMT 2025


Sven Hartge <sven at svenhartge.de> writes:

> On 16.03.25 22:49, Carsten Leonhardt wrote:

>> Workaround:
>> Execute the following before the upgrade:
>> echo "CREATE EXTENSION pg_trgm;" | sudo -u postgres psql bacula
>
> Does it need to be conditional or will it be a NOOP if the extension
> already exists? I know nearly nothing about PSQL, so I have no idea.

Apparently it needs the conditional:

# echo "CREATE EXTENSION pg_trgm;" | sudo -u postgres psql bacula
ERROR:  extension "pg_trgm" already exists

What's strange is that a fresh install works without having to resort to
dbadmin privileges and it ends up with the extension installed. Also
updates from a freshly installed 9.6.7 work ok and install the extension
during the upgrade.

Anyway, a fix is arriving in git now.



More information about the pkg-bacula-devel mailing list