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
b1f2a94f
Commit
b1f2a94f
authored
14 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
In pg_upgrade, adjust transfer_relfile()'s parameters to be more logical.
parent
5cff5b57
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/pg_upgrade/relfilenode.c
+18
-18
18 additions, 18 deletions
contrib/pg_upgrade/relfilenode.c
with
18 additions
and
18 deletions
contrib/pg_upgrade/relfilenode.c
+
18
−
18
View file @
b1f2a94f
...
...
@@ -17,8 +17,8 @@ static void transfer_single_new_db(pageCnvCtx *pageConverter,
FileNameMap
*
maps
,
int
size
);
static
void
transfer_relfile
(
pageCnvCtx
*
pageConverter
,
const
char
*
fromfile
,
const
char
*
tofile
,
const
char
*
oldnspname
,
const
char
*
oldrel
name
,
const
char
*
newnsp
name
,
const
char
*
newrelname
);
const
char
*
old
_
nspname
,
const
char
*
new_nsp
name
,
const
char
*
old_rel
name
,
const
char
*
new
_
relname
);
/* used by scandir(), must be global */
char
scandir_file_pattern
[
MAXPGPATH
];
...
...
@@ -149,8 +149,8 @@ transfer_single_new_db(pageCnvCtx *pageConverter,
*/
unlink
(
new_file
);
transfer_relfile
(
pageConverter
,
old_file
,
new_file
,
maps
[
mapnum
].
old_nspname
,
maps
[
mapnum
].
old_rel
name
,
maps
[
mapnum
].
new_nsp
name
,
maps
[
mapnum
].
new_relname
);
maps
[
mapnum
].
old_nspname
,
maps
[
mapnum
].
new_nsp
name
,
maps
[
mapnum
].
old_rel
name
,
maps
[
mapnum
].
new_relname
);
/* fsm/vm files added in PG 8.4 */
if
(
GET_MAJOR_VERSION
(
old_cluster
.
major_version
)
>=
804
)
...
...
@@ -173,8 +173,8 @@ transfer_single_new_db(pageCnvCtx *pageConverter,
unlink
(
new_file
);
transfer_relfile
(
pageConverter
,
old_file
,
new_file
,
maps
[
mapnum
].
old_nspname
,
maps
[
mapnum
].
old_rel
name
,
maps
[
mapnum
].
new_nsp
name
,
maps
[
mapnum
].
new_relname
);
maps
[
mapnum
].
old_nspname
,
maps
[
mapnum
].
new_nsp
name
,
maps
[
mapnum
].
old_rel
name
,
maps
[
mapnum
].
new_relname
);
}
}
}
...
...
@@ -201,8 +201,8 @@ transfer_single_new_db(pageCnvCtx *pageConverter,
unlink
(
new_file
);
transfer_relfile
(
pageConverter
,
old_file
,
new_file
,
maps
[
mapnum
].
old_nspname
,
maps
[
mapnum
].
old_rel
name
,
maps
[
mapnum
].
new_nsp
name
,
maps
[
mapnum
].
new_relname
);
maps
[
mapnum
].
old_nspname
,
maps
[
mapnum
].
new_nsp
name
,
maps
[
mapnum
].
old_rel
name
,
maps
[
mapnum
].
new_relname
);
}
}
}
...
...
@@ -223,9 +223,9 @@ transfer_single_new_db(pageCnvCtx *pageConverter,
* Copy or link file from old cluster to new one.
*/
static
void
transfer_relfile
(
pageCnvCtx
*
pageConverter
,
const
char
*
oldfile
,
const
char
*
newfile
,
const
char
*
oldnspname
,
const
char
*
oldrel
name
,
const
char
*
newnsp
name
,
const
char
*
newrelname
)
transfer_relfile
(
pageCnvCtx
*
pageConverter
,
const
char
*
old
_
file
,
const
char
*
new
_
file
,
const
char
*
old
_
nspname
,
const
char
*
new_nsp
name
,
const
char
*
old_rel
name
,
const
char
*
new
_
relname
)
{
const
char
*
msg
;
...
...
@@ -235,21 +235,21 @@ transfer_relfile(pageCnvCtx *pageConverter, const char *oldfile,
if
(
user_opts
.
transfer_mode
==
TRANSFER_MODE_COPY
)
{
pg_log
(
PG_INFO
,
"copying %s to %s
\n
"
,
oldfile
,
newfile
);
pg_log
(
PG_INFO
,
"copying %s to %s
\n
"
,
old
_
file
,
new
_
file
);
if
((
msg
=
copyAndUpdateFile
(
pageConverter
,
oldfile
,
newfile
,
true
))
!=
NULL
)
if
((
msg
=
copyAndUpdateFile
(
pageConverter
,
old
_
file
,
new
_
file
,
true
))
!=
NULL
)
pg_log
(
PG_FATAL
,
"error while copying %s.%s(%s) to %s.%s(%s): %s
\n
"
,
oldnspname
,
oldrelname
,
oldfile
,
newnspname
,
newrelname
,
newfile
,
msg
);
old
_
nspname
,
old
_
relname
,
old
_
file
,
new
_
nspname
,
new
_
relname
,
new
_
file
,
msg
);
}
else
{
pg_log
(
PG_INFO
,
"linking %s to %s
\n
"
,
oldfile
,
newfile
);
pg_log
(
PG_INFO
,
"linking %s to %s
\n
"
,
old
_
file
,
new
_
file
);
if
((
msg
=
linkAndUpdateFile
(
pageConverter
,
oldfile
,
newfile
))
!=
NULL
)
if
((
msg
=
linkAndUpdateFile
(
pageConverter
,
old
_
file
,
new
_
file
))
!=
NULL
)
pg_log
(
PG_FATAL
,
"error while creating link from %s.%s(%s) to %s.%s(%s): %s
\n
"
,
oldnspname
,
oldrelname
,
oldfile
,
newnspname
,
newrelname
,
newfile
,
msg
);
old
_
nspname
,
old
_
relname
,
old
_
file
,
new
_
nspname
,
new
_
relname
,
new
_
file
,
msg
);
}
return
;
}
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