mirror of
https://github.com/postgres/postgres.git
synced 2025-11-25 12:03:53 +03:00
Track shared buffer hits in pg_stat_io
Among other things, this should make it easier to calculate a useful cache hit ratio by excluding buffer reads via buffer access strategies. As buffer access strategies reuse buffers (and thus evict the prior buffer contents), it is normal to see reads on repeated scans of the same data. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/CAAKRu_beMa9Hzih40%3DXPYqhDVz6tsgUGTrhZXRo%3Dunp%2Bszb%3DUA%40mail.gmail.com
This commit is contained in:
@@ -419,7 +419,7 @@ extern PrefetchBufferResult PrefetchLocalBuffer(SMgrRelation smgr,
|
||||
ForkNumber forkNum,
|
||||
BlockNumber blockNum);
|
||||
extern BufferDesc *LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum,
|
||||
BlockNumber blockNum, bool *foundPtr, IOContext *io_context);
|
||||
BlockNumber blockNum, bool *foundPtr);
|
||||
extern void MarkLocalBufferDirty(Buffer buffer);
|
||||
extern void DropRelationLocalBuffers(RelFileLocator rlocator,
|
||||
ForkNumber forkNum,
|
||||
|
||||
Reference in New Issue
Block a user