Content-Length: 259456 | pFad | http://github.com/postgrespro/postgres_cluster/commit/ee4673ac071f8352c41cc673299b7ec695f079ff

94 Don't exaggerate the number of temporary blocks read. · postgrespro/postgres_cluster@ee4673a · GitHub
Skip to content

Commit ee4673a

Browse files
committed
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
1 parent cf7ab13 commit ee4673a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/storage/file/buffile.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ BufFileLoadBuffer(BufFile *file)
264264
file->offsets[file->curFile] += file->nbytes;
265265
/* we choose not to advance curOffset here */
266266

267-
pgBufferUsage.temp_blks_read++;
267+
if (file->nbytes > 0)
268+
pgBufferUsage.temp_blks_read++;
268269
}
269270

270271
/*

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/ee4673ac071f8352c41cc673299b7ec695f079ff

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy