Skip to content

Commit c42cd05

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 in xlog.c (7d70809 has moved this logic entirely to xlogbackup.c when building the contents of the backup history file). - Remove check on log_min_duration in analyze.c, as it is already true where this code path is reached. - Simplify call to find_option() in guc.c. Author: Ranier Vilela Reviewed-by: Masahiko Sawada Discussion: https://postgr.es/m/CAEudQArCDQQiPiFR16=yu9k5s2tp4tgEe1U1ZbkW4ofx81AWWQ@mail.gmail.com
1 parent 62be9e4 commit c42cd05

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-
struct config_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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy