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
cd7d00ad
Commit
cd7d00ad
authored
Feb 28, 2013
by
Alvaro Herrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve pg_upgrade commentary on multixact change
Per gripe from Andres Freund
parent
63d283ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
contrib/pg_upgrade/controldata.c
contrib/pg_upgrade/controldata.c
+4
-2
contrib/pg_upgrade/pg_upgrade.c
contrib/pg_upgrade/pg_upgrade.c
+4
-5
contrib/pg_upgrade/pg_upgrade.h
contrib/pg_upgrade/pg_upgrade.h
+4
-1
No files found.
contrib/pg_upgrade/controldata.c
View file @
cd7d00ad
...
@@ -470,7 +470,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
...
@@ -470,7 +470,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
/* verify that we got all the mandatory pg_control data */
/* verify that we got all the mandatory pg_control data */
if
(
!
got_xid
||
!
got_oid
||
if
(
!
got_xid
||
!
got_oid
||
!
got_multi
||
!
got_mxoff
||
!
got_multi
||
!
got_mxoff
||
(
!
got_oldestmulti
&&
cluster
->
controldata
.
cat_ver
>=
MULTIXACT_FORMATCHANGE_CAT_VER
)
||
(
!
got_oldestmulti
&&
cluster
->
controldata
.
cat_ver
>=
MULTIXACT_FORMATCHANGE_CAT_VER
)
||
(
!
live_check
&&
!
got_nextxlogfile
)
||
(
!
live_check
&&
!
got_nextxlogfile
)
||
!
got_tli
||
!
got_tli
||
!
got_align
||
!
got_blocksz
||
!
got_largesz
||
!
got_walsz
||
!
got_align
||
!
got_blocksz
||
!
got_largesz
||
!
got_walsz
||
...
@@ -493,7 +494,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
...
@@ -493,7 +494,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if
(
!
got_mxoff
)
if
(
!
got_mxoff
)
pg_log
(
PG_REPORT
,
" latest checkpoint next MultiXactOffset
\n
"
);
pg_log
(
PG_REPORT
,
" latest checkpoint next MultiXactOffset
\n
"
);
if
(
!
got_oldestmulti
&&
cluster
->
controldata
.
cat_ver
>=
MULTIXACT_FORMATCHANGE_CAT_VER
)
if
(
!
got_oldestmulti
&&
cluster
->
controldata
.
cat_ver
>=
MULTIXACT_FORMATCHANGE_CAT_VER
)
pg_log
(
PG_REPORT
,
" latest checkpoint oldest MultiXactId
\n
"
);
pg_log
(
PG_REPORT
,
" latest checkpoint oldest MultiXactId
\n
"
);
if
(
!
live_check
&&
!
got_nextxlogfile
)
if
(
!
live_check
&&
!
got_nextxlogfile
)
...
...
contrib/pg_upgrade/pg_upgrade.c
View file @
cd7d00ad
...
@@ -407,11 +407,10 @@ copy_clog_xlog_xid(void)
...
@@ -407,11 +407,10 @@ copy_clog_xlog_xid(void)
check_ok
();
check_ok
();
/*
/*
* If both new and old are after the pg_multixact change commit, copy those
* If the old server is before the MULTIXACT_FORMATCHANGE_CAT_VER change
* files too. If the old server is before that change and the new server
* (see pg_upgrade.h) and the new server is after, then we don't copy
* is after, then we don't copy anything but we need to reset pg_control so
* pg_multixact files, but we need to reset pg_control so that the new
* that the new server doesn't attempt to read multis older than the cutoff
* server doesn't attempt to read multis older than the cutoff value.
* value.
*/
*/
if
(
old_cluster
.
controldata
.
cat_ver
>=
MULTIXACT_FORMATCHANGE_CAT_VER
&&
if
(
old_cluster
.
controldata
.
cat_ver
>=
MULTIXACT_FORMATCHANGE_CAT_VER
&&
new_cluster
.
controldata
.
cat_ver
>=
MULTIXACT_FORMATCHANGE_CAT_VER
)
new_cluster
.
controldata
.
cat_ver
>=
MULTIXACT_FORMATCHANGE_CAT_VER
)
...
...
contrib/pg_upgrade/pg_upgrade.h
View file @
cd7d00ad
...
@@ -109,7 +109,10 @@ extern char *output_files[];
...
@@ -109,7 +109,10 @@ extern char *output_files[];
#define VISIBILITY_MAP_CRASHSAFE_CAT_VER 201107031
#define VISIBILITY_MAP_CRASHSAFE_CAT_VER 201107031
/*
/*
* pg_multixact format changed in this catversion:
* pg_multixact format changed in 9.3 commit 0ac5ad5134f2769ccbaefec73844f85,
* ("Improve concurrency of foreign key locking") which also updated catalog
* version to this value. pg_upgrade behavior depends on whether old and new
* server versions are both newer than this, or only the new one is.
*/
*/
#define MULTIXACT_FORMATCHANGE_CAT_VER 201301231
#define MULTIXACT_FORMATCHANGE_CAT_VER 201301231
...
...
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