From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix pg_dump for GRANT OPTION among initial privileges.
Date: Sat, 16 Jan 2021 20:22:19 +0000
Message-ID: <E1l0s5T-0002Mp-VG@gemulon.postgresql.org> (raw)
Fix pg_dump for GRANT OPTION among initial privileges.
The context is an object that no longer bears some aclitem that it bore
initially. (A user issued REVOKE or GRANT statements upon the object.)
pg_dump is forming SQL to reproduce the object ACL. Since initdb
creates no ACL bearing GRANT OPTION, reaching this bug requires an
extension where the creation script establishes such an ACL. No PGXN
extension does that. If an installation did reach the bug, pg_dump
would have omitted a semicolon, causing a REVOKE and the next SQL
statement to fail. Separately, since the affected code exists to
eliminate an entire aclitem, it wants plain REVOKE, not REVOKE GRANT
OPTION FOR. Back-patch to 9.6, where commit
23f34fa4ba358671adab16773e79c17c92cbc870 first appeared.
Discussion: https://postgr.es/m/20210109102423.GA160022@rfd.leadboat.com
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/c6ff165f99a7ecc4420b513ab7ea3c2dd72927a3
Modified Files
--------------
src/bin/pg_dump/dumputils.c | 61 ++++++++--------------
src/test/modules/test_pg_dump/t/001_base.pl | 39 ++++++++++++++
.../modules/test_pg_dump/test_pg_dump--1.0.sql | 9 ++++
3 files changed, 70 insertions(+), 39 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: noah@leadboat.com
Subject: Re: pgsql: Fix pg_dump for GRANT OPTION among initial privileges.
In-Reply-To: <E1l0s5T-0002Mp-VG@gemulon.postgresql.org>
References: <E1l0s5T-0002Mp-VG@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox