1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-22 23:02:54 +03:00

Don't exaggerate the number of temporary blocks read.

A read that returns zero bytes (or an error) should not increment
the number of temporary blocks read.

Thomas Munro

Discussion: http://postgr.es/m/CAEepm=21xgihg=WaG+O5MFotEZfN6kFETpfw+RkSnEqNQqGn2Q@mail.gmail.com
This commit is contained in:
Robert Haas 2017-10-31 14:54:41 +05:30
parent cf7ab13bfb
commit ee4673ac07

View File

@ -264,7 +264,8 @@ BufFileLoadBuffer(BufFile *file)
file->offsets[file->curFile] += file->nbytes; file->offsets[file->curFile] += file->nbytes;
/* we choose not to advance curOffset here */ /* we choose not to advance curOffset here */
pgBufferUsage.temp_blks_read++; if (file->nbytes > 0)
pgBufferUsage.temp_blks_read++;
} }
/* /*