Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
1b5d8e6d
Commit
1b5d8e6d
authored
23 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Fix recreation of sequence files for 7.2 also because of XID change from
beta4 to beta5.
parent
7138a1e5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/bin/pg_dump/pg_upgrade
+11
-7
11 additions, 7 deletions
src/bin/pg_dump/pg_upgrade
with
11 additions
and
7 deletions
src/bin/pg_dump/pg_upgrade
+
11
−
7
View file @
1b5d8e6d
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# pg_upgrade: update a database without needing a full dump/reload cycle.
# pg_upgrade: update a database without needing a full dump/reload cycle.
# CAUTION: Read the manual page before trying to use this!
# CAUTION: Read the manual page before trying to use this!
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.3
3
2002/01/13
05:36:42
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.3
4
2002/01/13
17:52:00
momjian Exp $
#
#
# NOTE: we must be sure to update the version-checking code a few dozen lines
# NOTE: we must be sure to update the version-checking code a few dozen lines
# below for each new PostgreSQL release.
# below for each new PostgreSQL release.
...
@@ -70,8 +70,10 @@ make_dbobjoidmap()
...
@@ -70,8 +70,10 @@ make_dbobjoidmap()
WHERE relkind
=
'r'
OR
WHERE relkind
=
'r'
OR
relkind
=
'i'
OR
relkind
=
'i'
OR
relkind
=
't'
\"
`
"
relkind
=
't'
\"
`
"
# Don't move over 7.1 sequences; use setval() file
# Don't move over 7.1 int4 sequences; use setval() file.
if
[
"
$SRC_VERSION
"
!=
"7.1"
]
# Sequence XIDs changed from 7.2beta4 to beta5; don't copy them.
if
[
"
$SRC_VERSION
"
!=
"7.1"
-a
\
"
$SRC_VERSION
"
!=
"7.2"
]
then
QUERY
=
"
$QUERY
OR relkind = 'S';"
;
then
QUERY
=
"
$QUERY
OR relkind = 'S';"
;
QUERY
=
"
$QUERY
;"
QUERY
=
"
$QUERY
;"
fi
fi
...
@@ -213,8 +215,9 @@ $0 aborted." 1>&2
...
@@ -213,8 +215,9 @@ $0 aborted." 1>&2
make_dbobjoidmap
>
"
$INFODIR
"
/dbobjoidmap
make_dbobjoidmap
>
"
$INFODIR
"
/dbobjoidmap
# Generate setval() script for 7.1 because it has int4 sequences
# Generate setval() script for 7.1 because it has int4 sequences
# Sequence XIDs changed from 7.2beta4 to beta5; we have to recreate them.
if
[
"
$SRC_VERSION
"
=
"7.1"
]
if
[
"
$SRC_VERSION
"
=
"7.1"
-o
\
"
$SRC_VERSION
"
=
"7.2"
]
then
then
psql
-d
template1
-At
-c
"SELECT datname FROM pg_database"
|
psql
-d
template1
-At
-c
"SELECT datname FROM pg_database"
|
grep
-v
'^template0$'
|
grep
-v
'^template0$'
|
...
@@ -511,8 +514,9 @@ fi
...
@@ -511,8 +514,9 @@ fi
# Set sequence values for 7.1-version sequences, which were int4.
# Set sequence values for 7.1-version sequences, which were int4.
if
[
"
$SRC_VERSION
"
=
"7.1"
]
if
[
"
$SRC_VERSION
"
=
"7.1"
-o
\
then
echo
"Set int8 sequence values from 7.1..."
"
$SRC_VERSION
"
=
"7.2"
]
then
echo
"Set sequence values..."
psql
-d
template1
-At
<
"
$INFODIR
"
/setval
psql
-d
template1
-At
<
"
$INFODIR
"
/setval
if
[
$?
-ne
0
]
if
[
$?
-ne
0
]
then
echo
"There were errors during int4 sequence restore.
then
echo
"There were errors during int4 sequence restore.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment