Commit a7e5457
committed
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>1 parent 27d2c12 commit a7e5457
File tree
4 files changed
+24
-6
lines changed- src/bin
- pg_dump
- pg_upgrade
4 files changed
+24
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| 164 | + | |
| 165 | + | |
163 | 166 | | |
164 | 167 | | |
165 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
2855 | 2856 | | |
2856 | 2857 | | |
2857 | 2858 | | |
2858 | | - | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
2859 | 2863 | | |
2860 | 2864 | | |
2861 | 2865 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
549 | 555 | | |
550 | 556 | | |
551 | 557 | | |
| |||
722 | 728 | | |
723 | 729 | | |
724 | 730 | | |
725 | | - | |
| 731 | + | |
726 | 732 | | |
727 | 733 | | |
728 | 734 | | |
729 | 735 | | |
730 | 736 | | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
731 | 740 | | |
732 | 741 | | |
733 | 742 | | |
| |||
806 | 815 | | |
807 | 816 | | |
808 | 817 | | |
| 818 | + | |
809 | 819 | | |
810 | 820 | | |
811 | 821 | | |
| |||
2039 | 2049 | | |
2040 | 2050 | | |
2041 | 2051 | | |
2042 | | - | |
| 2052 | + | |
2043 | 2053 | | |
2044 | 2054 | | |
2045 | 2055 | | |
2046 | 2056 | | |
2047 | 2057 | | |
2048 | | - | |
| 2058 | + | |
| 2059 | + | |
2049 | 2060 | | |
2050 | 2061 | | |
2051 | 2062 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| |||
0 commit comments