diff options
author | Andres Freund <andres@anarazel.de> | 2023-01-20 21:16:47 -0800 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2023-01-20 21:16:47 -0800 |
commit | 25b2aba0c3a501e2af9579f1b629f155544935db (patch) | |
tree | 563063c0c002285d51f100d027683afaf50169fe /src/backend/storage/buffer/bufmgr.c | |
parent | 5d29d525ffe028fdf6b2d3ff7502243e56c6c79a (diff) | |
download | postgresql-25b2aba0c3a501e2af9579f1b629f155544935db.tar.gz postgresql-25b2aba0c3a501e2af9579f1b629f155544935db.zip |
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
Diffstat (limited to 'src/backend/storage/buffer/bufmgr.c')
-rw-r--r-- | src/backend/storage/buffer/bufmgr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 8075828e8a6..800a4248c95 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -1017,6 +1017,8 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, if (track_io_timing) INSTR_TIME_SET_CURRENT(io_start); + else + INSTR_TIME_SET_ZERO(io_start); smgrread(smgr, forkNum, blockNum, (char *) bufBlock); @@ -2902,6 +2904,8 @@ FlushBuffer(BufferDesc *buf, SMgrRelation reln) if (track_io_timing) INSTR_TIME_SET_CURRENT(io_start); + else + INSTR_TIME_SET_ZERO(io_start); /* * bufToWrite is either the shared buffer or a copy, as appropriate. |