summaryrefslogtreecommitdiff
path: root/src/backend/storage/file/buffile.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-09-17 13:15:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-09-17 13:15:55 +0000
commit35c2a3c3cf8ef497b090c9dbfae1bf565c62b2a3 (patch)
treefa79e5ba6a59c64f31952ca0b445bed542c24585 /src/backend/storage/file/buffile.c
parent32f159cc55bacad6a4737d3584cb69698c33fc86 (diff)
Allow ShowBufferUsage() to report the number of reads/writes that have
occurred to temporary files. This replaces the unused NDirectFileRead/NDirectFileWrite counters. Itagaki Takahiro
Diffstat (limited to 'src/backend/storage/file/buffile.c')
-rw-r--r--src/backend/storage/file/buffile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/storage/file/buffile.c b/src/backend/storage/file/buffile.c
index 3bcb04b558a..d41d21c327c 100644
--- a/src/backend/storage/file/buffile.c
+++ b/src/backend/storage/file/buffile.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/file/buffile.c,v 1.31 2008/05/02 01:08:27 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/file/buffile.c,v 1.32 2008/09/17 13:15:55 tgl Exp $
*
* NOTES:
*
@@ -36,6 +36,7 @@
#include "storage/fd.h"
#include "storage/buffile.h"
+#include "storage/buf_internals.h"
/*
* We break BufFiles into gigabyte-sized segments, regardless of RELSEG_SIZE.
@@ -238,6 +239,8 @@ BufFileLoadBuffer(BufFile *file)
file->nbytes = 0;
file->offsets[file->curFile] += file->nbytes;
/* we choose not to advance curOffset here */
+
+ BufFileReadCount++;
}
/*
@@ -300,6 +303,8 @@ BufFileDumpBuffer(BufFile *file)
file->offsets[file->curFile] += bytestowrite;
file->curOffset += bytestowrite;
wpos += bytestowrite;
+
+ BufFileWriteCount++;
}
file->dirty = false;