pgsql: pg_dump: label INDEX ATTACH ArchiveEntries with an owner.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_dump: label INDEX ATTACH ArchiveEntries with an owner.
Date: 2021-01-12 18:37:57
Message-ID: E1kzOYH-00072G-TS@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_dump: label INDEX ATTACH ArchiveEntries with an owner.

Although a partitioned index's attachment to its parent doesn't
have separate ownership, the ArchiveEntry for it needs to be
marked with an owner anyway, to ensure that the ALTER command
is run by the appropriate role when restoring with
--use-set-session-authorization. Without this, the ALTER will
be run by the role that started the restore session, which will
usually work but it's formally the wrong thing.

Back-patch to v11 where this type of ArchiveEntry was added.
In HEAD, add equivalent commentary to the just-added TABLE ATTACH
case, which I'd made do the right thing already.

Discussion: https://postgr.es/m/1094034.1610418498@sss.pgh.pa.us

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0011c5a0fdacc5991b996e0081c218fbea4461a8

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 8 ++++++++
1 file changed, 8 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2021-01-12 20:08:19 pgsql: Invent struct ReindexIndexInfo
Previous Message Tom Lane 2021-01-12 17:53:28 pgsql: Doc: fix description of privileges needed for ALTER PUBLICATION.