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
b1f2a94f
Commit
b1f2a94f
authored
Jan 05, 2011
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In pg_upgrade, adjust transfer_relfile()'s parameters to be more logical.
parent
5cff5b57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
contrib/pg_upgrade/relfilenode.c
contrib/pg_upgrade/relfilenode.c
+18
-18
No files found.
contrib/pg_upgrade/relfilenode.c
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
*
old
nspname
,
const
char
*
oldrel
name
,
const
char
*
newnspname
,
const
char
*
new
relname
);
const
char
*
old
_nspname
,
const
char
*
new_nsp
name
,
const
char
*
old_relname
,
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
*
new
file
,
const
char
*
oldnspname
,
const
char
*
oldrel
name
,
const
char
*
newnspname
,
const
char
*
new
relname
)
transfer_relfile
(
pageCnvCtx
*
pageConverter
,
const
char
*
old
_
file
,
const
char
*
new
_file
,
const
char
*
old_nspname
,
const
char
*
new_nsp
name
,
const
char
*
old_relname
,
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
"
,
old
file
,
new
file
);
pg_log
(
PG_INFO
,
"copying %s to %s
\n
"
,
old
_file
,
new_
file
);
if
((
msg
=
copyAndUpdateFile
(
pageConverter
,
old
file
,
new
file
,
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
"
,
old
nspname
,
oldrelname
,
oldfile
,
newnspname
,
newrelname
,
new
file
,
msg
);
old
_nspname
,
old_relname
,
old_file
,
new_nspname
,
new_relname
,
new_
file
,
msg
);
}
else
{
pg_log
(
PG_INFO
,
"linking %s to %s
\n
"
,
old
file
,
new
file
);
pg_log
(
PG_INFO
,
"linking %s to %s
\n
"
,
old
_file
,
new_
file
);
if
((
msg
=
linkAndUpdateFile
(
pageConverter
,
old
file
,
new
file
))
!=
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
"
,
old
nspname
,
oldrelname
,
oldfile
,
newnspname
,
new
relname
,
newfile
,
msg
);
old
_nspname
,
old_relname
,
old_file
,
new_nspname
,
new_
relname
,
new
_
file
,
msg
);
}
return
;
}
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