diff options
author | Robert Haas <rhaas@postgresql.org> | 2009-12-15 04:57:48 +0000 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2009-12-15 04:57:48 +0000 |
commit | cddca5ec13d27017281422124cae0480cddfb663 (patch) | |
tree | 08d7d89e25d95ec3989cb8e929b84abff3249b0f /src/backend/storage/file/buffile.c | |
parent | 6f1bf75d50a576a326c1529180982622981855f5 (diff) | |
download | postgresql-cddca5ec13d27017281422124cae0480cddfb663.tar.gz postgresql-cddca5ec13d27017281422124cae0480cddfb663.zip |
Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics.
This patch also removes buffer-usage statistics from the track_counts
output, since this (or the global server statistics) is deemed to be a better
interface to this information.
Itagaki Takahiro, reviewed by Euler Taveira de Oliveira.
Diffstat (limited to 'src/backend/storage/file/buffile.c')
-rw-r--r-- | src/backend/storage/file/buffile.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/storage/file/buffile.c b/src/backend/storage/file/buffile.c index 9516c88acdb..b5806c59804 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.34 2009/06/11 14:49:01 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/storage/file/buffile.c,v 1.35 2009/12/15 04:57:47 rhaas Exp $ * * NOTES: * @@ -34,6 +34,7 @@ #include "postgres.h" +#include "executor/instrument.h" #include "storage/fd.h" #include "storage/buffile.h" #include "storage/buf_internals.h" @@ -240,7 +241,7 @@ BufFileLoadBuffer(BufFile *file) file->offsets[file->curFile] += file->nbytes; /* we choose not to advance curOffset here */ - BufFileReadCount++; + pgBufferUsage.temp_blks_read++; } /* @@ -304,7 +305,7 @@ BufFileDumpBuffer(BufFile *file) file->curOffset += bytestowrite; wpos += bytestowrite; - BufFileWriteCount++; + pgBufferUsage.temp_blks_written++; } file->dirty = false; |