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

Commitc42cd05

Browse files
committed
Cleanup useless assignments and checks
This cleans up a couple of areas:- Remove XLogSegNo calculation for the last WAL segment in backup inxlog.c (7d70809 has moved this logic entirely to xlogbackup.c whenbuilding the contents of the backup history file).- Remove check on log_min_duration in analyze.c, as it is already truewhere this code path is reached.- Simplify call to find_option() in guc.c.Author: Ranier VilelaReviewed-by: Masahiko SawadaDiscussion:https://postgr.es/m/CAEudQArCDQQiPiFR16=yu9k5s2tp4tgEe1U1ZbkW4ofx81AWWQ@mail.gmail.com
1 parent62be9e4 commitc42cd05

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8733,7 +8733,6 @@ do_pg_backup_stop(BackupState *state, bool waitforarchive)
87338733
*/
87348734
RequestXLogSwitch(false);
87358735

8736-
XLByteToPrevSeg(state->stoppoint,_logSegNo,wal_segment_size);
87378736
state->stoptime= (pg_time_t)time(NULL);
87388737

87398738
/*

‎src/backend/commands/analyze.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
360360
}
361361

362362
pg_rusage_init(&ru0);
363-
if (params->log_min_duration >=0)
364-
starttime=GetCurrentTimestamp();
363+
starttime=GetCurrentTimestamp();
365364
}
366365

367366
/*

‎src/backend/utils/misc/guc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5262,12 +5262,10 @@ read_nondefault_variables(void)
52625262

52635263
for (;;)
52645264
{
5265-
structconfig_generic*record;
5266-
52675265
if ((varname=read_string_with_null(fp))==NULL)
52685266
break;
52695267

5270-
if ((record=find_option(varname, true, false,FATAL))==NULL)
5268+
if (find_option(varname, true, false,FATAL)==NULL)
52715269
elog(FATAL,"failed to locate variable \"%s\" in exec config params file",varname);
52725270

52735271
if ((varvalue=read_string_with_null(fp))==NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp