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/buffer/localbuf.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/buffer/localbuf.c')
-rw-r--r-- | src/backend/storage/buffer/localbuf.c | 5 |
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++; } /* |