mirror of
https://github.com/postgres/postgres.git
synced 2025-10-15 05:46:52 +03:00
Zero initialize uses of instr_time about to trigger compiler warnings
These are all not necessary from a correctness POV. However, in the near future instr_time will be simplified to an int64, at which point gcc would otherwise start to warn about the changed places. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/20230116023639.rn36vf6ajqmfciua@awork3.anarazel.de
This commit is contained in:
@@ -2191,6 +2191,8 @@ XLogWrite(XLogwrtRqst WriteRqst, TimeLineID tli, bool flexible)
|
||||
/* Measure I/O timing to write WAL data */
|
||||
if (track_wal_io_timing)
|
||||
INSTR_TIME_SET_CURRENT(start);
|
||||
else
|
||||
INSTR_TIME_SET_ZERO(start);
|
||||
|
||||
pgstat_report_wait_start(WAIT_EVENT_WAL_WRITE);
|
||||
written = pg_pwrite(openLogFile, from, nleft, startoffset);
|
||||
@@ -8151,6 +8153,8 @@ issue_xlog_fsync(int fd, XLogSegNo segno, TimeLineID tli)
|
||||
/* Measure I/O timing to sync the WAL file */
|
||||
if (track_wal_io_timing)
|
||||
INSTR_TIME_SET_CURRENT(start);
|
||||
else
|
||||
INSTR_TIME_SET_ZERO(start);
|
||||
|
||||
pgstat_report_wait_start(WAIT_EVENT_WAL_SYNC);
|
||||
switch (sync_method)
|
||||
|
Reference in New Issue
Block a user