pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS
6+ messages / 1 participants
[nested] [flat]

* pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS
@ 2017-03-06 22:06 Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Stephen Frost @ 2017-03-06 22:06 UTC (permalink / raw)
  To: pgsql-committers

pg_upgrade: Fix large object COMMENTS, SECURITY LABELS

When performing a pg_upgrade, we copy the files behind pg_largeobject
and pg_largeobject_metadata, allowing us to avoid having to dump out and
reload the actual data for large objects and their ACLs.

Unfortunately, that isn't all of the information which can be associated
with large objects.  Currently, we also support COMMENTs and SECURITY
LABELs with large objects and these were being silently dropped during a
pg_upgrade as pg_dump would skip everything having to do with a large
object and pg_upgrade only copied the tables mentioned to the new
cluster.

As the file copies happen after the catalog dump and reload, we can't
simply include the COMMENTs and SECURITY LABELs in pg_dump's binary-mode
output but we also have to include the actual large object definition as
well.  With the definition, comments, and security labels in the pg_dump
output and the file copies performed by pg_upgrade, all of the data and
metadata associated with large objects is able to be successfully pulled
forward across a pg_upgrade.

In 9.6 and master, we can simply adjust the dump bitmask to indicate
which components we don't want.  In 9.5 and earlier, we have to put
explciit checks in in dumpBlob() and dumpBlobs() to not include the ACL
or the data when in binary-upgrade mode.

Adjustments made to the privileges regression test to allow another test
(large_object.sql) to be added which explicitly leaves a large object
with a comment in place to provide coverage of that case with
pg_upgrade.

Back-patch to all supported branches.

Discussion: https://postgr.es/m/20170221162655.GE9812@tamriel.snowman.net

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ff992c074e308ade204a38eb43a6d19c8403414e

Modified Files
--------------
src/bin/pg_dump/pg_backup.h                |  1 +
src/bin/pg_dump/pg_backup_archiver.c       | 10 +++++++++-
src/bin/pg_dump/pg_dump.c                  | 31 +++++++++++++++++++++++++++---
src/bin/pg_dump/t/002_pg_dump.pl           | 14 ++++++++++----
src/test/regress/expected/large_object.out | 15 +++++++++++++++
src/test/regress/expected/privileges.out   |  8 ++++----
src/test/regress/parallel_schedule         |  2 +-
src/test/regress/serial_schedule           |  1 +
src/test/regress/sql/large_object.sql      |  8 ++++++++
src/test/regress/sql/privileges.sql        |  6 +++---
10 files changed, 80 insertions(+), 16 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS
@ 2017-03-06 22:06 Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Stephen Frost @ 2017-03-06 22:06 UTC (permalink / raw)
  To: pgsql-committers

pg_upgrade: Fix large object COMMENTS, SECURITY LABELS

When performing a pg_upgrade, we copy the files behind pg_largeobject
and pg_largeobject_metadata, allowing us to avoid having to dump out and
reload the actual data for large objects and their ACLs.

Unfortunately, that isn't all of the information which can be associated
with large objects.  Currently, we also support COMMENTs and SECURITY
LABELs with large objects and these were being silently dropped during a
pg_upgrade as pg_dump would skip everything having to do with a large
object and pg_upgrade only copied the tables mentioned to the new
cluster.

As the file copies happen after the catalog dump and reload, we can't
simply include the COMMENTs and SECURITY LABELs in pg_dump's binary-mode
output but we also have to include the actual large object definition as
well.  With the definition, comments, and security labels in the pg_dump
output and the file copies performed by pg_upgrade, all of the data and
metadata associated with large objects is able to be successfully pulled
forward across a pg_upgrade.

In 9.6 and master, we can simply adjust the dump bitmask to indicate
which components we don't want.  In 9.5 and earlier, we have to put
explciit checks in in dumpBlob() and dumpBlobs() to not include the ACL
or the data when in binary-upgrade mode.

Adjustments made to the privileges regression test to allow another test
(large_object.sql) to be added which explicitly leaves a large object
with a comment in place to provide coverage of that case with
pg_upgrade.

Back-patch to all supported branches.

Discussion: https://postgr.es/m/20170221162655.GE9812@tamriel.snowman.net

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/65a3f233b2cf9aa7750d0c634654a65f4c5579c4

Modified Files
--------------
src/bin/pg_dump/pg_backup.h                |  1 +
src/bin/pg_dump/pg_backup_archiver.c       | 12 +++++++++++-
src/bin/pg_dump/pg_dump.c                  | 31 +++++++++++++++++++++++++++---
src/test/regress/expected/large_object.out | 15 +++++++++++++++
src/test/regress/expected/privileges.out   |  8 ++++----
src/test/regress/parallel_schedule         |  2 +-
src/test/regress/serial_schedule           |  1 +
src/test/regress/sql/large_object.sql      |  8 ++++++++
src/test/regress/sql/privileges.sql        |  6 +++---
9 files changed, 72 insertions(+), 12 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS
@ 2017-03-06 22:06 Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Stephen Frost @ 2017-03-06 22:06 UTC (permalink / raw)
  To: pgsql-committers

pg_upgrade: Fix large object COMMENTS, SECURITY LABELS

When performing a pg_upgrade, we copy the files behind pg_largeobject
and pg_largeobject_metadata, allowing us to avoid having to dump out and
reload the actual data for large objects and their ACLs.

Unfortunately, that isn't all of the information which can be associated
with large objects.  Currently, we also support COMMENTs and SECURITY
LABELs with large objects and these were being silently dropped during a
pg_upgrade as pg_dump would skip everything having to do with a large
object and pg_upgrade only copied the tables mentioned to the new
cluster.

As the file copies happen after the catalog dump and reload, we can't
simply include the COMMENTs and SECURITY LABELs in pg_dump's binary-mode
output but we also have to include the actual large object definition as
well.  With the definition, comments, and security labels in the pg_dump
output and the file copies performed by pg_upgrade, all of the data and
metadata associated with large objects is able to be successfully pulled
forward across a pg_upgrade.

In 9.6 and master, we can simply adjust the dump bitmask to indicate
which components we don't want.  In 9.5 and earlier, we have to put
explciit checks in in dumpBlob() and dumpBlobs() to not include the ACL
or the data when in binary-upgrade mode.

Adjustments made to the privileges regression test to allow another test
(large_object.sql) to be added which explicitly leaves a large object
with a comment in place to provide coverage of that case with
pg_upgrade.

Back-patch to all supported branches.

Discussion: https://postgr.es/m/20170221162655.GE9812@tamriel.snowman.net

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6be8647f7862dbbefe4d49d842566738cd753963

Modified Files
--------------
src/bin/pg_dump/pg_backup.h                |  1 +
src/bin/pg_dump/pg_backup_archiver.c       | 12 ++++++++++-
src/bin/pg_dump/pg_dump.c                  | 34 +++++++++++++++++++++++++-----
src/test/regress/expected/large_object.out | 15 +++++++++++++
src/test/regress/expected/privileges.out   |  8 +++----
src/test/regress/parallel_schedule         |  2 +-
src/test/regress/serial_schedule           |  1 +
src/test/regress/sql/large_object.sql      |  7 ++++++
src/test/regress/sql/privileges.sql        |  6 +++---
9 files changed, 72 insertions(+), 14 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS
@ 2017-03-06 22:06 Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Stephen Frost @ 2017-03-06 22:06 UTC (permalink / raw)
  To: pgsql-committers

pg_upgrade: Fix large object COMMENTS, SECURITY LABELS

When performing a pg_upgrade, we copy the files behind pg_largeobject
and pg_largeobject_metadata, allowing us to avoid having to dump out and
reload the actual data for large objects and their ACLs.

Unfortunately, that isn't all of the information which can be associated
with large objects.  Currently, we also support COMMENTs and SECURITY
LABELs with large objects and these were being silently dropped during a
pg_upgrade as pg_dump would skip everything having to do with a large
object and pg_upgrade only copied the tables mentioned to the new
cluster.

As the file copies happen after the catalog dump and reload, we can't
simply include the COMMENTs and SECURITY LABELs in pg_dump's binary-mode
output but we also have to include the actual large object definition as
well.  With the definition, comments, and security labels in the pg_dump
output and the file copies performed by pg_upgrade, all of the data and
metadata associated with large objects is able to be successfully pulled
forward across a pg_upgrade.

In 9.6 and master, we can simply adjust the dump bitmask to indicate
which components we don't want.  In 9.5 and earlier, we have to put
explciit checks in in dumpBlob() and dumpBlobs() to not include the ACL
or the data when in binary-upgrade mode.

Adjustments made to the privileges regression test to allow another test
(large_object.sql) to be added which explicitly leaves a large object
with a comment in place to provide coverage of that case with
pg_upgrade.

Back-patch to all supported branches.

Discussion: https://postgr.es/m/20170221162655.GE9812@tamriel.snowman.net

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/93598898c8d203ef296f4f5870c5f948e9fda416

Modified Files
--------------
src/bin/pg_dump/pg_backup.h                |  1 +
src/bin/pg_dump/pg_backup_archiver.c       | 12 ++++++++++-
src/bin/pg_dump/pg_dump.c                  | 34 +++++++++++++++++++++++++-----
src/test/regress/expected/large_object.out | 15 +++++++++++++
src/test/regress/expected/privileges.out   |  8 +++----
src/test/regress/parallel_schedule         |  2 +-
src/test/regress/serial_schedule           |  1 +
src/test/regress/sql/large_object.sql      |  7 ++++++
src/test/regress/sql/privileges.sql        |  6 +++---
9 files changed, 72 insertions(+), 14 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS
@ 2017-03-06 22:06 Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Stephen Frost @ 2017-03-06 22:06 UTC (permalink / raw)
  To: pgsql-committers

pg_upgrade: Fix large object COMMENTS, SECURITY LABELS

When performing a pg_upgrade, we copy the files behind pg_largeobject
and pg_largeobject_metadata, allowing us to avoid having to dump out and
reload the actual data for large objects and their ACLs.

Unfortunately, that isn't all of the information which can be associated
with large objects.  Currently, we also support COMMENTs and SECURITY
LABELs with large objects and these were being silently dropped during a
pg_upgrade as pg_dump would skip everything having to do with a large
object and pg_upgrade only copied the tables mentioned to the new
cluster.

As the file copies happen after the catalog dump and reload, we can't
simply include the COMMENTs and SECURITY LABELs in pg_dump's binary-mode
output but we also have to include the actual large object definition as
well.  With the definition, comments, and security labels in the pg_dump
output and the file copies performed by pg_upgrade, all of the data and
metadata associated with large objects is able to be successfully pulled
forward across a pg_upgrade.

In 9.6 and master, we can simply adjust the dump bitmask to indicate
which components we don't want.  In 9.5 and earlier, we have to put
explciit checks in in dumpBlob() and dumpBlobs() to not include the ACL
or the data when in binary-upgrade mode.

Adjustments made to the privileges regression test to allow another test
(large_object.sql) to be added which explicitly leaves a large object
with a comment in place to provide coverage of that case with
pg_upgrade.

Back-patch to all supported branches.

Discussion: https://postgr.es/m/20170221162655.GE9812@tamriel.snowman.net

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7f831f09bb85d93d99f55269479e4b6d105937f8

Modified Files
--------------
src/bin/pg_dump/pg_backup.h                |  1 +
src/bin/pg_dump/pg_backup_archiver.c       | 12 ++++++++++-
src/bin/pg_dump/pg_dump.c                  | 34 +++++++++++++++++++++++++-----
src/test/regress/expected/large_object.out | 15 +++++++++++++
src/test/regress/expected/privileges.out   |  8 +++----
src/test/regress/parallel_schedule         |  2 +-
src/test/regress/serial_schedule           |  1 +
src/test/regress/sql/large_object.sql      |  7 ++++++
src/test/regress/sql/privileges.sql        |  6 +++---
9 files changed, 72 insertions(+), 14 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS
@ 2017-03-06 22:06 Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Stephen Frost @ 2017-03-06 22:06 UTC (permalink / raw)
  To: pgsql-committers

pg_upgrade: Fix large object COMMENTS, SECURITY LABELS

When performing a pg_upgrade, we copy the files behind pg_largeobject
and pg_largeobject_metadata, allowing us to avoid having to dump out and
reload the actual data for large objects and their ACLs.

Unfortunately, that isn't all of the information which can be associated
with large objects.  Currently, we also support COMMENTs and SECURITY
LABELs with large objects and these were being silently dropped during a
pg_upgrade as pg_dump would skip everything having to do with a large
object and pg_upgrade only copied the tables mentioned to the new
cluster.

As the file copies happen after the catalog dump and reload, we can't
simply include the COMMENTs and SECURITY LABELs in pg_dump's binary-mode
output but we also have to include the actual large object definition as
well.  With the definition, comments, and security labels in the pg_dump
output and the file copies performed by pg_upgrade, all of the data and
metadata associated with large objects is able to be successfully pulled
forward across a pg_upgrade.

In 9.6 and master, we can simply adjust the dump bitmask to indicate
which components we don't want.  In 9.5 and earlier, we have to put
explciit checks in in dumpBlob() and dumpBlobs() to not include the ACL
or the data when in binary-upgrade mode.

Adjustments made to the privileges regression test to allow another test
(large_object.sql) to be added which explicitly leaves a large object
with a comment in place to provide coverage of that case with
pg_upgrade.

Back-patch to all supported branches.

Discussion: https://postgr.es/m/20170221162655.GE9812@tamriel.snowman.net

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/e864cd25b4f5a85e0c236cf845daff99433937db

Modified Files
--------------
src/bin/pg_dump/pg_backup.h                |  1 +
src/bin/pg_dump/pg_backup_archiver.c       | 12 ++++++++++-
src/bin/pg_dump/pg_dump.c                  | 34 +++++++++++++++++++++++++-----
src/test/regress/expected/large_object.out | 15 +++++++++++++
src/test/regress/expected/privileges.out   |  8 +++----
src/test/regress/parallel_schedule         |  2 +-
src/test/regress/serial_schedule           |  1 +
src/test/regress/sql/large_object.sql      |  7 ++++++
src/test/regress/sql/privileges.sql        |  6 +++---
9 files changed, 72 insertions(+), 14 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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


end of thread, other threads:[~2017-03-06 22:06 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-03-06 22:06 pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS Stephen Frost <sfrost@snowman.net>
2017-03-06 22:06 pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS Stephen Frost <sfrost@snowman.net>
2017-03-06 22:06 pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS Stephen Frost <sfrost@snowman.net>
2017-03-06 22:06 pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS Stephen Frost <sfrost@snowman.net>
2017-03-06 22:06 pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS Stephen Frost <sfrost@snowman.net>
2017-03-06 22:06 pgsql: pg_upgrade: Fix large object COMMENTS, SECURITY LABELS Stephen Frost <sfrost@snowman.net>

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