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 1qjPRD-00AweO-Us for pgsql-bugs@arkaria.postgresql.org; Thu, 21 Sep 2023 19:34:12 +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 1qjPRC-00EUfV-Ja for pgsql-bugs@arkaria.postgresql.org; Thu, 21 Sep 2023 19:34:10 +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 1qjPNv-00EQxD-7F for pgsql-bugs@lists.postgresql.org; Thu, 21 Sep 2023 19:30:47 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qjPNs-005sDK-97 for pgsql-bugs@lists.postgresql.org; Thu, 21 Sep 2023 19:30:45 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id DAB1A5F7B7; Thu, 21 Sep 2023 15:30:37 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=snowman.net; s=dkim; t=1695324637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IBturt/cvJCaGwgj5vq8uHGWYFHPzbjqgewo804C7PQ=; b=q/6fxooHGECGjv2vopKFXK+HB8N0TphaB6iwqkyrZ1vTMml8zjei9DHUQMt74lIy4DKXQX zVo5ucRUvShG4sPs2UfkY+4oP+ssriTr0FPj260YIlcbKnM1inTK4q5lWcqOSU2njH0mAB MhTcyd7+BWWdU4BPq7uKG4BCraw8bZk= Date: Thu, 21 Sep 2023 15:30:37 -0400 From: Stephen Frost To: =?utf-8?B?QWxlxaEgWmVsZW7DvQ==?= Cc: PostgreSQL mailing lists Subject: Re: Invalid dump file after drop of role that previously created extension containing a table. Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Y87q3EWew0AfSKOy" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.1.4 (2021-12-11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Y87q3EWew0AfSKOy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Ale=C5=A1 Zelen=C3=BD (zeleny.ales@gmail.com) wrote: > Testcase description: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 1) An extension (I've used pg_cron as an example because it contains a > table) is created by a database user (login role), and the initial > privileges at extension creation are stored for the extension object > (table in my test case) in the pg_catalog.pg_init_privs table. > 2) Change the database user objects ownership from step 1 to another > database user -> this step keeps the pg_catalog.pg_init_privs table > content for the extension table from step 1 untouched. > 3) Drop the database user used in step 1 and as its entry is deleted > from the catalog, all that remains is the OID of the deleted database > user in the pg_catalog.pg_init_privs table, later used by pg_dump. Hrmpf. Yeah, seems like if we're going to allow extensions and extension objects to be impacted by REASSIGN OWNED and such then we need to be sure to update pg_init_privs accordingly. At least that's my first thought seeing this. Would welcome thoughts from others on this though. Thanks, Stephen --Y87q3EWew0AfSKOy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEwf6gbxKhD863zrx/7WyKOINHZFUFAmUMmdsACgkQ7WyKOINH ZFV7RQ//anS//rMg+LkoUKB9PbplbG0x+g34khO9/v3jpUFKjbYX6zAgBokYkhuu ADSzk0vQp2M1aHXB7QDmq9+TrBiflXvhDJxZkpOYIgoLxoJX/Su6O6YHL+6yHLwd 7pXMv8z1FW+z4YA15mDakWUh2bywysjXb2LIrgIHiuEWcv94z0MoVxcFG9md5aWO 2NMUDzVov/N25aPE7s9u9ZkuNoS51z/HdGOeTHXQv/LMzZygQ92SmlFfb+/Pc5Sr 49NEqPfsAsKhp+t+NtWvsyG0VITV8k59VsNQ7SA0G2pmRqWLkSvJzeBiG7rzoiRD I8zmTN7EPDqO7fQUNDbQuHap5141z/y7J75rXdhSRCVsY6ZrMFEt+w/otXGAnJAI 8D5MhR3Ak6oyV1a5QC37ZLQe2ItcykSTmTO/OewoYXJv2RHGkylEOrRm9GmCakcq ufm4VWcyQN9GewZneaO36EIgmCi9pHZiGArJ6vkRDr5SCC61r4335IpCzSsJ0RWF NmCFBepZWTf1nnPFRETXBc6S03oJ/HJD1HmUrQAspGSK5UvK6uoXvpofvAula7rd 7+kn5gpPguZKSkd5aG9ZuDAniK0XuauwukbhlrC7UiTG+e0lMxqxQbX5geFRKSJo K+8BfXodbuxhMVJgLtAmS6qXdr4/x7ljZ8VCevxHjyUnNbPEiko= =PRWc -----END PGP SIGNATURE----- --Y87q3EWew0AfSKOy--