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

Commit77553de

Browse files
danielgustafssonpull[bot]
authored andcommitted
Rename variable for code clarity
When tracking IO timing for WAL, the duration is what we calculatebased on the start and end timestamps, it's not what the variablecontains. Rename the timestamp variable to end to better communicatewhat it contains. Original patch by Krishnakumar with additionalhacking to fix another occurrence by me.Author: Krishnakumar R <kksrcv001@gmail.com>Discussion:https://postgr.es/m/CAPMWgZ9f9o8awrQpjo8oxnNQ=bMDVPx00NE0QcDzvHD_ZrdLPw@mail.gmail.com
1 parent4388d0f commit77553de

File tree

1 file changed

+6
-6
lines changed
  • src/backend/access/transam

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,10 +2226,10 @@ XLogWrite(XLogwrtRqst WriteRqst, TimeLineID tli, bool flexible)
22262226
*/
22272227
if (track_wal_io_timing)
22282228
{
2229-
instr_timeduration;
2229+
instr_timeend;
22302230

2231-
INSTR_TIME_SET_CURRENT(duration);
2232-
INSTR_TIME_ACCUM_DIFF(PendingWalStats.wal_write_time,duration,start);
2231+
INSTR_TIME_SET_CURRENT(end);
2232+
INSTR_TIME_ACCUM_DIFF(PendingWalStats.wal_write_time,end,start);
22332233
}
22342234

22352235
PendingWalStats.wal_write++;
@@ -8252,10 +8252,10 @@ issue_xlog_fsync(int fd, XLogSegNo segno, TimeLineID tli)
82528252
*/
82538253
if (track_wal_io_timing)
82548254
{
8255-
instr_timeduration;
8255+
instr_timeend;
82568256

8257-
INSTR_TIME_SET_CURRENT(duration);
8258-
INSTR_TIME_ACCUM_DIFF(PendingWalStats.wal_sync_time,duration,start);
8257+
INSTR_TIME_SET_CURRENT(end);
8258+
INSTR_TIME_ACCUM_DIFF(PendingWalStats.wal_sync_time,end,start);
82598259
}
82608260

82618261
PendingWalStats.wal_sync++;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp