pgsql: pg_upgrade: Upgrade sequence data via pg_dump

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: pg_upgrade: Upgrade sequence data via pg_dump
Date: 2016-11-14 02:50:34
Message-ID: E1c67Lu-0001Lz-JH@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_upgrade: Upgrade sequence data via pg_dump

Previously, pg_upgrade migrated sequence data like tables by copying the
on-disk file. This does not allow any changes in the on-disk format for
sequences. It's simpler to just have pg_dump set the new sequence
values as it normally does. To do that, create a hidden submode in
pg_dump that dumps sequence data even when a schema-only dump is
requested, and trigger that submode in binary upgrade mode. (This new
submode could easily be exposed as a command-line option, but it has
limited use outside of pg_dump and would probably cause some confusion,
so we don't do that at this time.)

Reviewed-by: Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>
Reviewed-by: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>

Branch
------
master

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

Modified Files
--------------
src/bin/pg_dump/pg_backup.h | 3 +++
src/bin/pg_dump/pg_backup_archiver.c | 6 +++++-
src/bin/pg_dump/pg_dump.c | 19 +++++++++++++++----
src/bin/pg_upgrade/info.c | 2 +-
4 files changed, 24 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2016-11-14 14:16:59 pgsql: Fix duplication in ALTER MATERIALIZE VIEW synopsis
Previous Message Tom Lane 2016-11-13 18:13:01 pgsql: Doc: remove obsolete example.