Re: Dump & restore in directory format and permissions are largely lost?

From: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Dump & restore in directory format and permissions are largely lost?
Date: 2021-06-16 01:23:03
Message-ID: CAOC+FBUuZ6gvhtxZknn_NbH0eMh3CTS8bf1Toq+XxPp7E4c5yg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

It looks like the dump, then is creating an insufficient number of ACL
statements. Running

pg_restore -Fd -l db.full.dump/ | grep ACL | grep webaccess

Shows nothing, though I use this role on many schemas and relations.

Is there anything about this dump statement that would prevent some ACL
lines from being generated?

time pg_dump \
--verbose \
--dbname=db \
--blobs \
--jobs=8 \
--format=directory \
--file=db.full.dump

Is there a way to run pg_dump to spit out all ACL lines w/o having to do
the full dump?

On Tue, Jun 15, 2021 at 6:19 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Wells Oliver <wells(dot)oliver(at)gmail(dot)com> writes:
> > Yes. The target and source servers have the same users and roles, which
> is
> > why their permissions being absent from the same objects on the target
> > where they exist in the source is very confusing to me.
>
> Did you look for errors in the log output of both pg_dump and pg_restore?
>
> > I also do a pg_restore -l -Fd on the dump file, and I don't see any GRANT
> > or REVOKE statements: should I expect that?
>
> They'd show up in "-l" output as ACL items.
>
> regards, tom lane
>

--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2021-06-16 01:30:36 Re: Dump & restore in directory format and permissions are largely lost?
Previous Message Tom Lane 2021-06-16 01:19:17 Re: Dump & restore in directory format and permissions are largely lost?