diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2016-08-23 12:00:00 -0400 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2016-11-13 21:44:58 -0500 |
| commit | a7e5457db86642c078888bf666cf6b64636bb190 (patch) | |
| tree | e62e2c28d649de8c51c3031b968cb8f606c0024d /src/bin/pg_dump/pg_backup.h | |
| parent | 27d2c1232879aab5636da56b698764d553b9c5c6 (diff) | |
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.lubennikova@postgrespro.ru>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
Diffstat (limited to 'src/bin/pg_dump/pg_backup.h')
| -rw-r--r-- | src/bin/pg_dump/pg_backup.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/pg_dump/pg_backup.h b/src/bin/pg_dump/pg_backup.h index 0a28124cf60..cfdfae5e120 100644 --- a/src/bin/pg_dump/pg_backup.h +++ b/src/bin/pg_dump/pg_backup.h @@ -118,6 +118,7 @@ typedef struct _restoreOptions bool *idWanted; /* array showing which dump IDs to emit */ int enable_row_security; + int sequence_data; /* dump sequence data even in schema-only mode */ } RestoreOptions; typedef struct _dumpOptions @@ -160,6 +161,8 @@ typedef struct _dumpOptions bool outputBlobs; int outputNoOwner; char *outputSuperuser; + + int sequence_data; /* dump sequence data even in schema-only mode */ } DumpOptions; /* |
