Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com>, "Boris P(dot) Korzun" <drtr0jan(at)yandex(dot)ru>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES
Date: 2021-10-19 02:04:32
Message-ID: CAD21AoArNPsNKYE1b-oURYonUA7Zo-kaq-u661uWcZqTURb48A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Tue, Oct 19, 2021 at 8:47 AM Bossart, Nathan <bossartn(at)amazon(dot)com> wrote:
>
> On 10/14/21, 5:06 PM, "Masahiko Sawada" <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > The current pg_dump produced a REVOKE ALL ON TABLES FROM
> > regress_dump_test_role but it seems unnecessary. The patch removes it
> > so looks good to me too.
>
> +1
>

I've looked at the patch proposed you proposed. If we can depend on
acldefault() being STRICT (which is legitimate to me), I think we
don't need to build an expression depending on the caller (i.g.,
is_default_acl). If acldefault() were to become not STRICT, we could
detect it by regression tests. What do you think?

> If we are going to proceed with the patch in this thread, I think we
> should also mention in the comment that we are depending on
> acldefault() being STRICT.

I've updated the patch.

> This patch is quite a bit smaller than
> what I had proposed, but AFAICT it produces the same result.

Yes. I've also confirmed both produce the same result.

Regards,

--
Masahiko Sawada
EDB: https://www.enterprisedb.com/

Attachment Content-Type Size
fix-bug-on-dump-default-ACL_v4.patch application/octet-stream 2.3 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2021-10-19 02:08:06 Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable
Previous Message Bossart, Nathan 2021-10-18 23:46:56 Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-10-19 02:08:06 Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable
Previous Message houzj.fnst@fujitsu.com 2021-10-19 01:41:37 RE: Failed transaction statistics to measure the logical replication progress