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 1iWPsl-0006xD-Jp for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Nov 2019 19:06:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iWPsj-00073w-DW for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Nov 2019 19:06:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iWPsj-00073p-21 for pgsql-bugs@lists.postgresql.org; Sun, 17 Nov 2019 19:06:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iWPsc-0000u2-5m for pgsql-bugs@lists.postgresql.org; Sun, 17 Nov 2019 19:06:43 +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 xAHJ6XCA008348; Sun, 17 Nov 2019 14:06:33 -0500 From: Tom Lane To: Tomas Vondra cc: =?utf-8?B?5ZSv5LiA4piF?= <270246512@qq.com>, pgsql-bugs Subject: Re: =?utf-8?B?5Zue5aSN77yaICDlm57lpI3vvJogIOWbnuWkje+8miBCVQ==?= =?utf-8?Q?G?= #16101: tables in the DB is not available after pg_restore In-reply-to: <20191117173039.ahky34s6emk2zgxx@development> References: <16101-5a569e5aac6aa84e@postgresql.org> <20191108111339.xlopjkbwfhxfvwt3@development> <20191113133029.kagiy6vjjeoguatp@development> <20191113151803.6ye47vh3vyp5ufah@development> <20191117173039.ahky34s6emk2zgxx@development> Comments: In-reply-to Tomas Vondra message dated "Sun, 17 Nov 2019 18:30:39 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8346.1574017593.1@sss.pgh.pa.us> Date: Sun, 17 Nov 2019 14:06:33 -0500 Message-ID: <8347.1574017593@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: > What happens is that we *do not* include ACL for the public schema > unless when running in "clean" mode (i.e. when pg_dump is executed with > "-c" switch). This is the relevant comment from pg_dump.c: Note that that bit is new since v11; the OP is complaining about v10 which acted differently. I did some simple experiments that suggest that things are fine in this area as of v11+, but the reason we changed it is that it wasn't fine before. The most likely bet IMO is that the OP did a dump/restore with -c -x at some point, and that lost the ACL for the public schema, and now that state will be preserved by additional dump/restore cycles with -c. It'd be advisable to drop the database and create it fresh instead of using -c. regards, tom lane