Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iVeeE-00018Z-Tf for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Nov 2019 16:40:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iVeeD-0005mi-Ma for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Nov 2019 16:40:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iVeeD-0005ma-Ei for pgsql-bugs@lists.postgresql.org; Fri, 15 Nov 2019 16:40:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iVeeB-0002cv-8z for pgsql-bugs@lists.postgresql.org; Fri, 15 Nov 2019 16:40:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xAFGdXt4029914; Fri, 15 Nov 2019 11:39:33 -0500 From: Tom Lane To: Floris Van Nee cc: "pgsql-bugs@lists.postgresql.org" , Ferdi Smit , Stephen Frost Subject: Re: incorrect pg_dump output due to not handling dropped roles correctly In-reply-to: <1573808483712.96817@Optiver.com> References: <1573808483712.96817@Optiver.com> Comments: In-reply-to Floris Van Nee message dated "Fri, 15 Nov 2019 09:01:23 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29912.1573835973.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Nov 2019 11:39:33 -0500 Message-ID: <29913.1573835973@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Floris Van Nee writes: > I noticed I wasn't able to apply my usual pg_dump schema output without = errors anymore after I dropped some roles. After some digging, I found it = has to do with Postgres not correctly updating the pg_init_privs table upo= n dropping roles. I can reproduce a similar scenario with the following st= eps (output from v13devel, but AFAIK all versions affected, I ran into the= issue on v11.2): Hm, looks like we forgot to teach the dependency mechanism about pg_init_privs privileges? (I didn't look yet.) > Can I manually fix this by updating pg_init_privs catalog table? Yeah, I think that would work. Obviously best to test in a throwaway database ... regards, tom lane