mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Allow ShowBufferUsage() to report the number of reads/writes that have
occurred to temporary files. This replaces the unused NDirectFileRead/NDirectFileWrite counters. Itagaki Takahiro
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* 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 $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -64,12 +64,6 @@ bool zero_damaged_pages = false;
|
||||
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;
|
||||
@ -1572,7 +1566,7 @@ ShowBufferUsage(void)
|
||||
ReadLocalBufferCount - LocalBufferHitCount, LocalBufferFlushCount, localhitrate);
|
||||
appendStringInfo(&str,
|
||||
"!\tDirect blocks: %10ld read, %10ld written\n",
|
||||
NDirectFileRead, NDirectFileWrite);
|
||||
BufFileReadCount, BufFileWriteCount);
|
||||
|
||||
return str.data;
|
||||
}
|
||||
@ -1586,8 +1580,8 @@ ResetBufferUsage(void)
|
||||
LocalBufferHitCount = 0;
|
||||
ReadLocalBufferCount = 0;
|
||||
LocalBufferFlushCount = 0;
|
||||
NDirectFileRead = 0;
|
||||
NDirectFileWrite = 0;
|
||||
BufFileReadCount = 0;
|
||||
BufFileWriteCount = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user