*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/buffer/buf_init.c,v 1.80 2008/01/01 19:45:51 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/buffer/buf_init.c,v 1.81 2008/09/17 13:15:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
long int LocalBufferHitCount;
long int BufferFlushCount;
long int LocalBufferFlushCount;
+long int BufFileReadCount;
+long int BufFileWriteCount;
/*
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.237 2008/08/11 11:05:11 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.238 2008/09/17 13:15:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
int bgwriter_lru_maxpages = 100;
double bgwriter_lru_multiplier = 2.0;
-
-long NDirectFileRead; /* some I/O's are direct file access. bypass
- * bufmgr */
-long NDirectFileWrite; /* e.g., I/O in psort and hashjoin. */
-
-
/* local state for StartBufferIO and related functions */
static volatile BufferDesc *InProgressBuf = NULL;
static bool IsForInput;
ReadLocalBufferCount - LocalBufferHitCount, LocalBufferFlushCount, localhitrate);
appendStringInfo(&str,
"!\tDirect blocks: %10ld read, %10ld written\n",
- NDirectFileRead, NDirectFileWrite);
+ BufFileReadCount, BufFileWriteCount);
return str.data;
}
LocalBufferHitCount = 0;
ReadLocalBufferCount = 0;
LocalBufferFlushCount = 0;
- NDirectFileRead = 0;
- NDirectFileWrite = 0;
+ BufFileReadCount = 0;
+ BufFileWriteCount = 0;
}
/*
* 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:
*
#include "storage/fd.h"
#include "storage/buffile.h"
+#include "storage/buf_internals.h"
/*
* We break BufFiles into gigabyte-sized segments, regardless of RELSEG_SIZE.
file->nbytes = 0;
file->offsets[file->curFile] += file->nbytes;
/* we choose not to advance curOffset here */
+
+ BufFileReadCount++;
}
/*
file->offsets[file->curFile] += bytestowrite;
file->curOffset += bytestowrite;
wpos += bytestowrite;
+
+ BufFileWriteCount++;
}
file->dirty = false;
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/executor/execdebug.h,v 1.32 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/executor/execdebug.h,v 1.33 2008/09/17 13:15:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#define MJ_DEBUG_PROC_NODE(slot)
#endif /* EXEC_MERGEJOINDEBUG */
-/* ----------------------------------------------------------------
- * DO NOT DEFINE THESE EVER OR YOU WILL BURN!
- * ----------------------------------------------------------------
- */
-/* ----------------
- * NOTYET is placed around any code not yet implemented
- * in the executor. Only remove these when actually implementing
- * said code.
- * ----------------
- */
-#undef NOTYET
-
-extern long NDirectFileRead;
-extern long NDirectFileWrite;
-
#endif /* ExecDebugIncluded */
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.98 2008/08/11 11:05:11 heikki Exp $
+ * $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.99 2008/09/17 13:15:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
extern long int LocalBufferHitCount;
extern long int BufferFlushCount;
extern long int LocalBufferFlushCount;
+extern long int BufFileReadCount;
+extern long int BufFileWriteCount;
/*