aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer/localbuf.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2009-12-15 04:57:48 +0000
committerRobert Haas <rhaas@postgresql.org>2009-12-15 04:57:48 +0000
commitcddca5ec13d27017281422124cae0480cddfb663 (patch)
tree08d7d89e25d95ec3989cb8e929b84abff3249b0f /src/backend/storage/buffer/localbuf.c
parent6f1bf75d50a576a326c1529180982622981855f5 (diff)
downloadpostgresql-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/buffer/localbuf.c')
-rw-r--r--src/backend/storage/buffer/localbuf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c
index 3caa42a1a68..10e5025cf83 100644
--- a/src/backend/storage/buffer/localbuf.c
+++ b/src/backend/storage/buffer/localbuf.c
@@ -9,13 +9,14 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/buffer/localbuf.c,v 1.87 2009/06/11 14:49:01 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/buffer/localbuf.c,v 1.88 2009/12/15 04:57:47 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "catalog/catalog.h"
+#include "executor/instrument.h"
#include "storage/buf_internals.h"
#include "storage/bufmgr.h"
#include "storage/smgr.h"
@@ -209,7 +210,7 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum,
/* Mark not-dirty now in case we error out below */
bufHdr->flags &= ~BM_DIRTY;
- LocalBufferFlushCount++;
+ pgBufferUsage.local_blks_written++;
}
/*