Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4e99359

Browse files
committed
pg_upgrade: properly handle timeline variables
There is no behavior change here as we now always set the timeline toone.Report by Tom LaneBackpatch to 9.3 and 9.4
1 parentb054732 commit4e99359

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

‎contrib/pg_upgrade/controldata.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
229229
pg_log(PG_FATAL,"%d: controldata retrieval problem\n",__LINE__);
230230

231231
p++;/* removing ':' char */
232-
cluster->controldata.chkpnt_tli=str2uint(p);
232+
tli=str2uint(p);
233233
got_tli= true;
234234
}
235235
elseif ((p=strstr(bufin,"Latest checkpoint's NextXID:"))!=NULL)
@@ -479,11 +479,11 @@ get_control_data(ClusterInfo *cluster, bool live_check)
479479
* Before 9.3, pg_resetxlog reported the xlogid and segno of the first log
480480
* file after reset as separate lines. Starting with 9.3, it reports the
481481
* WAL file name. If the old cluster is older than 9.3, we construct the
482-
* WAL file name from the xlogid and segno.
482+
* WAL file name from thetli,xlogid, and segno.
483483
*/
484484
if (GET_MAJOR_VERSION(cluster->major_version) <=902)
485485
{
486-
if (got_log_id&&got_log_seg)
486+
if (got_tli&&got_log_id&&got_log_seg)
487487
{
488488
snprintf(cluster->controldata.nextxlogfile,25,"%08X%08X%08X",
489489
tli,logid,segno);
@@ -497,7 +497,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
497497
(!got_oldestmulti&&
498498
cluster->controldata.cat_ver >=MULTIXACT_FORMATCHANGE_CAT_VER)||
499499
(!live_check&& !got_nextxlogfile)||
500-
!got_tli||
501500
!got_align|| !got_blocksz|| !got_largesz|| !got_walsz||
502501
!got_walseg|| !got_ident|| !got_index|| !got_toast||
503502
!got_date_is_int|| !got_float8_pass_by_value|| !got_data_checksum_version)
@@ -525,9 +524,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
525524
if (!live_check&& !got_nextxlogfile)
526525
pg_log(PG_REPORT," first WAL segment after reset\n");
527526

528-
if (!got_tli)
529-
pg_log(PG_REPORT," latest checkpoint timeline ID\n");
530-
531527
if (!got_align)
532528
pg_log(PG_REPORT," maximum alignment\n");
533529

‎contrib/pg_upgrade/pg_upgrade.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ typedef struct
186186
uint32ctrl_ver;
187187
uint32cat_ver;
188188
charnextxlogfile[25];
189-
uint32chkpnt_tli;
190189
uint32chkpnt_nxtxid;
191190
uint32chkpnt_nxtepoch;
192191
uint32chkpnt_nxtoid;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp