Re: Make bloom extension trusted, but can not drop with normal user

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Li EF Zhang <bjzhangl(at)cn(dot)ibm(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Make bloom extension trusted, but can not drop with normal user
Date: 2021-08-24 15:37:36
Message-ID: CAKFQuwaEiW0QbDHS0qxmGRcqZQw6O_ieV-14CWY1QG2k0zaWBw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 24, 2021 at 8:17 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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.

[1]
https://www.postgresql.org/message-id/CAA3qoJkW4VzN4ixt-%3Du%3DtY1Di9YrzJNAhrxKdNhtQMJp2iD0Cg%40mail.gmail.com
[2]
https://github.com/postgres/postgres/commit/b1d32d3e3230f00b5baba08f75b4f665c7d6dac6

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Li EF Zhang 2021-08-25 03:51:38 RE: Can not ALTER TEXT SEARCH DICTIONARY intdict which is default in dict_int
Previous Message Adrian Klaver 2021-08-24 15:17:25 Re: Make bloom extension trusted, but can not drop with normal user