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

Commitd17ffc7

Browse files
committed
Count write times when extending relation files for shared buffers
Relation files extended by multiple blocks at a time have been countingthe number of blocks written, but forgot to increment the write time inthis case, as single-block write and relation extension are treated astwo different I/O operations in the shared stats: IOOP_EXTEND vsIOOP_WRITE. In this case IOOP_EXTEND was forgotten for normal(non-temporary) relations, still the number of blocks written wasincremented according to the relation extend done.Write times are tracked when track_io_timing is enabled, which is notthe case by default.Author: Nazir Bilal YavuzReviewed-by: Robert Haas, Melanie PlagemanDiscussion:https://postgr.es/m/CAN55FZ19Ss279mZuqGbuUNxka0iPbLgYuOQXqAKewrjNrp27VA@mail.gmail.comBackpatch-through: 16
1 parent173b56f commitd17ffc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/utils/activity/pgstat_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pgstat_count_io_op_time(IOObject io_object, IOContext io_context, IOOp io_op,
119119
INSTR_TIME_SET_CURRENT(io_time);
120120
INSTR_TIME_SUBTRACT(io_time,start_time);
121121

122-
if (io_op==IOOP_WRITE)
122+
if (io_op==IOOP_WRITE||io_op==IOOP_EXTEND)
123123
{
124124
pgstat_count_buffer_write_time(INSTR_TIME_GET_MICROSEC(io_time));
125125
if (io_object==IOOBJECT_RELATION)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp