Re: 回复: 回复: 回复: BUG #16101: tables in the DB is not available after pg_restore

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 唯一★ <270246512(at)qq(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: 回复: 回复: 回复: BUG #16101: tables in the DB is not available after pg_restore
Date: 2019-11-17 19:35:05
Message-ID: 20191117193505.tvglxnfywejta6z5@development
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sun, Nov 17, 2019 at 02:06:33PM -0500, Tom Lane wrote:
>Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Floris Van Nee 2019-11-17 20:56:13 Re: incorrect pg_dump output due to not handling dropped roles correctly
Previous Message Tom Lane 2019-11-17 19:06:33 Re: 回复: 回复: 回复: BUG #16101: tables in the DB is not available after pg_restore