pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix up pg_dump's handling of per-attribute compression options.
Date: Sat, 20 Mar 2021 19:01:17 +0000
Message-ID: <E1lNgqb-0005kI-2p@gemulon.postgresql.org> (raw)

Fix up pg_dump's handling of per-attribute compression options.

The approach used in commit bbe0a81db would've been disastrous for
portability of dumps.  Instead handle non-default compression options
in separate ALTER TABLE commands.  This reduces chatter for the
common case where most columns are compressed the same way, and it
makes it possible to restore the dump to a server that lacks any
knowledge of per-attribute compression options (so long as you're
willing to ignore syntax errors from the ALTER TABLE commands).

There's a whole lot left to do to mop up after bbe0a81db, but
I'm fast-tracking this part because we need to see if it's
enough to make the buildfarm's cross-version-upgrade tests happy.

Justin Pryzby and Tom Lane

Discussion: https://postgr.es/m/20210119190720.GL8560@telsasoft.com

Branch
------
master

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

Modified Files
--------------
src/bin/pg_dump/pg_backup.h          |   4 +-
src/bin/pg_dump/pg_backup_archiver.c |  34 ++++++++-
src/bin/pg_dump/pg_dump.c            | 133 ++++++++++++++++++++++++-----------
src/bin/pg_dump/pg_dump.h            |   2 +-
src/bin/pg_dump/t/002_pg_dump.pl     |  12 ++--
5 files changed, 134 insertions(+), 51 deletions(-)



Message-ID: <E1lNgqb-0005kI-2p@gemulon.postgresql.org>
Permalink:  ../E1lNgqb-0005kI-2p@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lNgqb-0005kI-2p@gemulon.postgresql.org

 · 

reply

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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix up pg_dump's handling of per-attribute compression options.
  In-Reply-To: <E1lNgqb-0005kI-2p@gemulon.postgresql.org>
  References: <E1lNgqb-0005kI-2p@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