Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uSG1f-005LvZ-J2 for pgsql-general@arkaria.postgresql.org; Thu, 19 Jun 2025 14:14:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uSG1d-00BjJk-D7 for pgsql-general@arkaria.postgresql.org; Thu, 19 Jun 2025 14:13:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uSG1d-00BjJZ-2r for pgsql-general@lists.postgresql.org; Thu, 19 Jun 2025 14:13:57 +0000 Received: from relay15.mail.gandi.net ([2001:4b98:dc4:8::235]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uSG1b-002tw0-0o for pgsql-general@lists.postgresql.org; Thu, 19 Jun 2025 14:13:56 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id A14FC4313E; Thu, 19 Jun 2025 14:13:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vondra.me; s=gm1; t=1750342429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R/JAaSgBGQqTfUMfE4PnLOaKcPb4oTsx1MWu+UWWolg=; b=XWamD1hXc+ZdQu7N5zfHns9ULfKULw6quVu+kmD2PNo3Haw1eZnRPa3ZbVvODrti318Shz Rz0CE2UtjGiZkLdzhKkKPHkfsSvIyeOXPgpwkXSW2S6nvDYLI5kkZqLWxZV79ayiEjVTF/ dQtvw2JHVFFQpSRuYTWnWWWTRbgll0/+TXY2CYCxeyqIKxrlOl7UDZs+u3S+Mk+h57zl5n kjX2l4GZ2wReUdGhPHiXf6TmJrgs/UTmx3r3yILULEPBhMlOj1dvpU5k3hkWTZCVpK0ETV FRJR9LJAozrRgXFQDI06AhdPfd/xvA7c+/p5ZfKhetUlodhJ/lsE8yazCZGRKQ== Message-ID: <6f6cfd46-6049-4f78-850d-613fd30465de@vondra.me> Date: Thu, 19 Jun 2025 16:13:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Extension disappearing act To: Dominique Devienne , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdehjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefvohhmrghsucggohhnughrrgcuoehtohhmrghssehvohhnughrrgdrmhgvqeenucggtffrrghtthgvrhhnpeduteekueelffegueffveeigeekvdeluefgvefgffeugfekheeufeeitefhlefhkeenucfkphepkeeirdegledrvdeftddrvddtieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeekiedrgeelrddvfedtrddvtdeipdhhvghloheplgdutddrudefjedrtddrvdgnpdhmrghilhhfrhhomhepthhomhgrshesvhhonhgurhgrrdhmvgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeguuggvvhhivghnnhgvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/19/25 15:09, 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? No, extensions should not disappear. > Any idea, what we're missing, that might explain pgcrypto's disappearance? > We're stumped for now. > The only idea I can come up with is that pgcrypto was in one of those dropped schemas (but I know you're saying it was in public). Are you able to reproduce this? If yes, can you share a reproducer? regards -- Tomas Vondra