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 1iWQKI-00083V-Et for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Nov 2019 19:35:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iWQKH-0004M6-6B for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Nov 2019 19:35:13 +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 1iWQKG-0004Lz-Ok for pgsql-bugs@lists.postgresql.org; Sun, 17 Nov 2019 19:35:12 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iWQKD-0004xp-QW for pgsql-bugs@lists.postgresql.org; Sun, 17 Nov 2019 19:35:12 +0000 Received: by mail-wr1-x444.google.com with SMTP id f2so16946510wrs.11 for ; Sun, 17 Nov 2019 11:35:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4KDfVdCTVn/LvQIn1AUw4dGuQPK1fNu7Vmcypv9HJ0c=; b=GbgGWGO0UvFR16kvOKsLNBjbUkbloQdx/O2IMUxbhxPsoHPmmROjckgg4YgotWVJq/ yF4It6g3dvJ7yHBp37KbT4Bhl4dqBxO4uSFFU4mIdD6qfhIaCt0fNrKyPNszLxpDRgIk 9u0MzNo4pYiWc63j3ydR3dHg3ddowtE1ebedBS2foUu92j66XCJRZhmDWxKN2isn6g3p i9K/AtNxP/yYdikkvLUokJSoKhiWaPdcy/1Gna/vfgFyIav6Bzr9WHK8p7KjHo5Tpp4W eSYzSD9OTF0HuuDUf+xD8LqUUrO5qe4ml7cw8ZoHexAEx2tR3mfSt1q3mtVW+8dyjWPn 7iqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4KDfVdCTVn/LvQIn1AUw4dGuQPK1fNu7Vmcypv9HJ0c=; b=cnjC6wq+D9JpQ76ne9gW7FtFq4xTkMS1o885RbtP6sqH7+1Q086939HJQJKuKXnzqc febKb5aw9Hs19KesLxKJ187u2riQNXwoSvqs0UrWxK20dP93rBkwxWXJMZImvcJ8ozKO 9vQ5Hnw50zg5lEtm6APMbi6mogBNG/5Zzvq4X1VtACd0G/Ba4gaZJgi9m8BRe0nMlpHr 8SZthOueRxegGYjaX9zlSv9TuycCwLGpUXkPNwlKBCLLDZw9e/KIDXmhU31FNqQXmxqm kH0ydiKhSdIhyAvj4X/XRDeVLzWeQrXRRf0QKQG7jmTBLxD+RcbxHUhoK+oTVRpCqHYG cCKA== X-Gm-Message-State: APjAAAXM0dLHUnm7dLKo1MCWnKWHnj8NvUZQ20gjgqc96bhSpVssbVGv ZpJD7blKyTI3nEZoA+R2WXorGA== X-Google-Smtp-Source: APXvYqyWOKiIZ6jloynu/qOTvU5ggMJxBcyIAuEKkaQJNb90lCQDvYTuj4O4sKtd3Jf+pskF7NrbKQ== X-Received: by 2002:a5d:6a08:: with SMTP id m8mr25058035wru.52.1574019308505; Sun, 17 Nov 2019 11:35:08 -0800 (PST) Received: from localhost (ip-86-49-253-92.net.upcbroadband.cz. [86.49.253.92]) by smtp.gmail.com with ESMTPSA id n1sm20679799wrr.24.2019.11.17.11.35.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Nov 2019 11:35:07 -0800 (PST) Date: Sun, 17 Nov 2019 20:35:05 +0100 From: Tomas Vondra To: Tom Lane 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 Message-ID: <20191117193505.tvglxnfywejta6z5@development> References: <16101-5a569e5aac6aa84e@postgresql.org> <20191108111339.xlopjkbwfhxfvwt3@development> <20191113133029.kagiy6vjjeoguatp@development> <20191113151803.6ye47vh3vyp5ufah@development> <20191117173039.ahky34s6emk2zgxx@development> <8347.1574017593@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <8347.1574017593@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Nov 17, 2019 at 02:06:33PM -0500, Tom Lane wrote: >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. > All the experiments I did were done on 10.11. Same for the code. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services