Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
9e5bed2d
Commit
9e5bed2d
authored
Mar 05, 2011
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restructure pg_upgrade checks because pre-8.4 Postgres did not rename
toast file names to match the new relfilenode.
parent
f7b70dfc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
contrib/pg_upgrade/info.c
contrib/pg_upgrade/info.c
+11
-8
No files found.
contrib/pg_upgrade/info.c
View file @
9e5bed2d
...
...
@@ -51,9 +51,18 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db,
RelInfo
*
new_rel
=
&
new_db
->
rel_arr
.
rels
[
relnum
];
if
(
old_rel
->
reloid
!=
new_rel
->
reloid
)
pg_log
(
PG_FATAL
,
"
m
ismatch of relation id: database
\"
%s
\"
, old relid %d, new relid %d
\n
"
,
pg_log
(
PG_FATAL
,
"
M
ismatch of relation id: database
\"
%s
\"
, old relid %d, new relid %d
\n
"
,
old_db
->
db_name
,
old_rel
->
reloid
,
new_rel
->
reloid
);
/* toast names were not renamed to match their relfilenodes in pre-8.4 */
if
(
GET_MAJOR_VERSION
(
old_cluster
.
major_version
)
>=
804
&&
(
strcmp
(
old_rel
->
nspname
,
new_rel
->
nspname
)
!=
0
||
strcmp
(
old_rel
->
relname
,
new_rel
->
relname
)
!=
0
))
pg_log
(
PG_FATAL
,
"Mismatch of relation names: database
\"
%s
\"
, "
"old rel %s.%s, new rel %s.%s
\n
"
,
old_db
->
db_name
,
old_rel
->
nspname
,
old_rel
->
relname
,
new_rel
->
nspname
,
new_rel
->
relname
);
create_rel_filename_map
(
old_pgdata
,
new_pgdata
,
old_db
,
new_db
,
old_rel
,
new_rel
,
maps
+
num_maps
);
num_maps
++
;
...
...
@@ -104,12 +113,6 @@ create_rel_filename_map(const char *old_data, const char *new_data,
/* new_relfilenode will match old and new pg_class.oid */
map
->
new_relfilenode
=
new_rel
->
relfilenode
;
if
(
strcmp
(
old_rel
->
nspname
,
new_rel
->
nspname
)
!=
0
||
strcmp
(
old_rel
->
relname
,
new_rel
->
relname
)
!=
0
)
pg_log
(
PG_FATAL
,
"mismatch of relation id: database
\"
%s
\"
, old rel %s.%s, new rel %s.%s
\n
"
,
old_db
->
db_name
,
old_rel
->
nspname
,
old_rel
->
relname
,
new_rel
->
nspname
,
new_rel
->
relname
);
/* used only for logging and error reporing, old/new are identical */
snprintf
(
map
->
nspname
,
sizeof
(
map
->
nspname
),
"%s"
,
old_rel
->
nspname
);
snprintf
(
map
->
relname
,
sizeof
(
map
->
relname
),
"%s"
,
old_rel
->
relname
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment