aboutsummaryrefslogtreecommitdiff
path: root/src/include/storage/bufmgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/storage/bufmgr.h')
-rw-r--r--src/include/storage/bufmgr.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index ad203621793..9ae83b4253e 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.103 2007/05/02 23:18:03 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.104 2007/05/30 20:12:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,6 +19,14 @@
typedef void *Block;
+/* Possible arguments for GetAccessStrategy() */
+typedef enum BufferAccessStrategyType
+{
+ BAS_NORMAL, /* Normal random access */
+ BAS_BULKREAD, /* Large read-only scan (hint bit updates are ok) */
+ BAS_VACUUM /* VACUUM */
+} BufferAccessStrategyType;
+
/* in globals.c ... this duplicates miscadmin.h */
extern DLLIMPORT int NBuffers;
@@ -111,6 +119,8 @@ extern DLLIMPORT int32 *LocalRefCount;
* prototypes for functions in bufmgr.c
*/
extern Buffer ReadBuffer(Relation reln, BlockNumber blockNum);
+extern Buffer ReadBufferWithStrategy(Relation reln, BlockNumber blockNum,
+ BufferAccessStrategy strategy);
extern Buffer ReadOrZeroBuffer(Relation reln, BlockNumber blockNum);
extern void ReleaseBuffer(Buffer buffer);
extern void UnlockReleaseBuffer(Buffer buffer);
@@ -157,6 +167,7 @@ extern void BgBufferSync(void);
extern void AtProcExit_LocalBuffers(void);
/* in freelist.c */
-extern void StrategyHintVacuum(bool vacuum_active);
+extern BufferAccessStrategy GetAccessStrategy(BufferAccessStrategyType btype);
+extern void FreeAccessStrategy(BufferAccessStrategy strategy);
#endif