Re: Make bloom extension trusted, but can not drop with normal user - Mailing list pgsql-general

From David G. Johnston
Subject Re: Make bloom extension trusted, but can not drop with normal user
Date
Msg-id CAKFQuwaEiW0QbDHS0qxmGRcqZQw6O_ieV-14CWY1QG2k0zaWBw@mail.gmail.com
Whole thread Raw
In response to Re: Make bloom extension trusted, but can not drop with normal user  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Make bloom extension trusted, but can not drop with normal user
List pgsql-general
On Tue, Aug 24, 2021 at 8:17 AM Adrian Klaver <adrian.klaver@aklaver.com> wrote:

To me the issue is that the extension was modified to trusted by an end
user not the extension author. I gotta believe there is more to the
trusted then a flag in the control file. It would not be surprising to
me that an ad hoc modification would fail.


If the expected behavior here is that an ordinary user can drop a trusted extension then I do not see how this error could present itself since, just like extension creation, all the flag does is allow the user to become a superuser for purposes of installing (or removing) the extension objects.  Per Tom, the pre-v14 drop behavior is indeed a bug.  It is not going to be back-patched, nor has the documentation been updated to say that DROP EXTENSION is effectively prevented due to the existence of this bug (if you really need superuser to install the extension it seems reasonable it requires the same to drop it).

Per an adjacent thread [1] this has apparently been fixed in v14 at [2] - but if so (not tested it myself) then it seems like an unexpected side-effect since that particular commit seems like a pure refactoring.

David J.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Make bloom extension trusted, but can not drop with normal user
Next
From: "David G. Johnston"
Date:
Subject: Re: Can not ALTER TEXT SEARCH DICTIONARY intdict which is default in dict_int