pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.
5+ messages / 1 participants
[nested] [flat]

* pgsql: pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.
@ 2021-01-14 21:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2021-01-14 21:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.

This is the same fix as commit 9eabfe300 applied to INDEX ATTACH
entries, but for table-to-publication attachments.  As in that
case, even though the backend doesn't record "ownership" of the
attachment, we still ought to label it in the dump archive with
the role name that should run the ALTER PUBLICATION command.
The existing behavior causes the ALTER to be done by the original
role that started the restore; that will usually work fine, but
there may be corner cases where it fails.

The bulk of the patch is concerned with changing struct
PublicationRelInfo to include a pointer to the associated
PublicationInfo object, so that we can get the owner's name
out of that when the time comes.  While at it, I rewrote
getPublicationTables() to do just one query of pg_publication_rel,
not one per table.

Back-patch to v10 where this code was introduced.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8e396a773b80c72e5d5a0ca9755dffe043c97a05

Modified Files
--------------
src/bin/pg_dump/common.c  |  18 ++++++-
src/bin/pg_dump/pg_dump.c | 123 ++++++++++++++++++++++++----------------------
src/bin/pg_dump/pg_dump.h |   6 ++-
3 files changed, 85 insertions(+), 62 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.
@ 2021-01-14 21:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2021-01-14 21:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.

This is the same fix as commit 9eabfe300 applied to INDEX ATTACH
entries, but for table-to-publication attachments.  As in that
case, even though the backend doesn't record "ownership" of the
attachment, we still ought to label it in the dump archive with
the role name that should run the ALTER PUBLICATION command.
The existing behavior causes the ALTER to be done by the original
role that started the restore; that will usually work fine, but
there may be corner cases where it fails.

The bulk of the patch is concerned with changing struct
PublicationRelInfo to include a pointer to the associated
PublicationInfo object, so that we can get the owner's name
out of that when the time comes.  While at it, I rewrote
getPublicationTables() to do just one query of pg_publication_rel,
not one per table.

Back-patch to v10 where this code was introduced.

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

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/79d3ac72f690b45e2b278be746f858a1f6311310

Modified Files
--------------
src/bin/pg_dump/common.c  |  18 ++++++-
src/bin/pg_dump/pg_dump.c | 123 ++++++++++++++++++++++++----------------------
src/bin/pg_dump/pg_dump.h |   6 ++-
3 files changed, 85 insertions(+), 62 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.
@ 2021-01-14 21:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2021-01-14 21:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.

This is the same fix as commit 9eabfe300 applied to INDEX ATTACH
entries, but for table-to-publication attachments.  As in that
case, even though the backend doesn't record "ownership" of the
attachment, we still ought to label it in the dump archive with
the role name that should run the ALTER PUBLICATION command.
The existing behavior causes the ALTER to be done by the original
role that started the restore; that will usually work fine, but
there may be corner cases where it fails.

The bulk of the patch is concerned with changing struct
PublicationRelInfo to include a pointer to the associated
PublicationInfo object, so that we can get the owner's name
out of that when the time comes.  While at it, I rewrote
getPublicationTables() to do just one query of pg_publication_rel,
not one per table.

Back-patch to v10 where this code was introduced.

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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0d221ececeb9697b4e0c3a1c22861e8f54bd050d

Modified Files
--------------
src/bin/pg_dump/common.c  |  18 ++++++-
src/bin/pg_dump/pg_dump.c | 124 ++++++++++++++++++++++++----------------------
src/bin/pg_dump/pg_dump.h |   6 ++-
3 files changed, 87 insertions(+), 61 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.
@ 2021-01-14 21:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2021-01-14 21:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.

This is the same fix as commit 9eabfe300 applied to INDEX ATTACH
entries, but for table-to-publication attachments.  As in that
case, even though the backend doesn't record "ownership" of the
attachment, we still ought to label it in the dump archive with
the role name that should run the ALTER PUBLICATION command.
The existing behavior causes the ALTER to be done by the original
role that started the restore; that will usually work fine, but
there may be corner cases where it fails.

The bulk of the patch is concerned with changing struct
PublicationRelInfo to include a pointer to the associated
PublicationInfo object, so that we can get the owner's name
out of that when the time comes.  While at it, I rewrote
getPublicationTables() to do just one query of pg_publication_rel,
not one per table.

Back-patch to v10 where this code was introduced.

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/bb12a7f429ca1b10aebc469d9379837fa3d09220

Modified Files
--------------
src/bin/pg_dump/common.c  |  18 ++++++-
src/bin/pg_dump/pg_dump.c | 126 ++++++++++++++++++++++++----------------------
src/bin/pg_dump/pg_dump.h |   6 ++-
3 files changed, 87 insertions(+), 63 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.
@ 2021-01-14 21:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2021-01-14 21:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner.

This is the same fix as commit 9eabfe300 applied to INDEX ATTACH
entries, but for table-to-publication attachments.  As in that
case, even though the backend doesn't record "ownership" of the
attachment, we still ought to label it in the dump archive with
the role name that should run the ALTER PUBLICATION command.
The existing behavior causes the ALTER to be done by the original
role that started the restore; that will usually work fine, but
there may be corner cases where it fails.

The bulk of the patch is concerned with changing struct
PublicationRelInfo to include a pointer to the associated
PublicationInfo object, so that we can get the owner's name
out of that when the time comes.  While at it, I rewrote
getPublicationTables() to do just one query of pg_publication_rel,
not one per table.

Back-patch to v10 where this code was introduced.

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

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1c9791f66cef61c07c1c9d959515981140362b01

Modified Files
--------------
src/bin/pg_dump/common.c  |  18 ++++++-
src/bin/pg_dump/pg_dump.c | 126 ++++++++++++++++++++++++----------------------
src/bin/pg_dump/pg_dump.h |   6 ++-
3 files changed, 87 insertions(+), 63 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2021-01-14 21:19 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 21:19 pgsql: pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner. Tom Lane <tgl@sss.pgh.pa.us>
2021-01-14 21:19 pgsql: pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner. Tom Lane <tgl@sss.pgh.pa.us>
2021-01-14 21:19 pgsql: pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner. Tom Lane <tgl@sss.pgh.pa.us>
2021-01-14 21:19 pgsql: pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner. Tom Lane <tgl@sss.pgh.pa.us>
2021-01-14 21:19 pgsql: pg_dump: label PUBLICATION TABLE ArchiveEntries with an owner. Tom Lane <tgl@sss.pgh.pa.us>

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