Re: Extension disappearing act

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Dominique Devienne <ddevienne(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Extension disappearing act
Date: 2025-06-19 16:35:55
Message-ID: 3318006a000e05360c487189bf8abe5c40732ce3.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2025-06-19 at 15:09 +0200, Dominique Devienne wrote:
> Hi. Little mystery we don't understand. v17.
>
> Create new DB, owned by dedicated new ROLE.
> Create extension (pgcrypto) in our case. Installed in public, owned by
> DB owner role.
> Create schemas and populate them inside the DB.
> This also creates roles associated to those schemas.
> One of the schema is owned by the DB owner (in case that matters).
> Creates functions using pgcrypto, in some of those schemas.
> Drop all schemas (and associated roles), thus pgcrypto-using functins are gone.
> Of course, the DB owner role was not dropped. Can't in fact.
> Somehow, the pgcrypto extension has disappeared, as side-effects of the drops.
> We did a LIBPQ trace of the command to does all the drops,
> and there's no explicit drop of the extension.
>
> All of the above is done using a LOGIN role that has CREATEROLE and CREATEDB.
>
> Extensions are not supposed to implicitly disappear, are they?
> Any idea, what we're missing, that might explain pgcrypto's disappearance?
> We're stumped for now.

So are we. Why do you keep us guessing instead of posting a reproducer?

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message legrand legrand 2025-06-19 19:31:51 does multi host connection string supports login event trigger exception
Previous Message Dominique Devienne 2025-06-19 14:54:03 Re: Extension disappearing act