diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 2000-10-28 16:21:00 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 2000-10-28 16:21:00 +0000 |
commit | 5b0740d3fcd55f6e545e8bd577fe8ccba2be4987 (patch) | |
tree | 06cf3807f89c23d365322e08f594e6bbaaa95a3c /src/include/storage | |
parent | 2f4c9d39febec0c092388b124bf3de2d857eb5a9 (diff) |
WAL
Diffstat (limited to 'src/include/storage')
-rw-r--r-- | src/include/storage/buf_internals.h | 6 | ||||
-rw-r--r-- | src/include/storage/bufmgr.h | 9 | ||||
-rw-r--r-- | src/include/storage/bufpage.h | 5 | ||||
-rw-r--r-- | src/include/storage/smgr.h | 27 |
4 files changed, 23 insertions, 24 deletions
diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index 65abe9b8ceb..80aca7c57e9 100644 --- a/src/include/storage/buf_internals.h +++ b/src/include/storage/buf_internals.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: buf_internals.h,v 1.41 2000/10/23 04:10:14 vadim Exp $ + * $Id: buf_internals.h,v 1.42 2000/10/28 16:21:00 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -109,6 +109,10 @@ typedef struct sbufdesc bool ri_lock; /* read-intent lock */ bool w_lock; /* context exclusively locked */ +#ifdef XLOG + bool cntxDirty; /* new way to mark block as dirty */ +#endif + BufferBlindId blind; /* was used to support blind write */ /* diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index 551f98e75f9..0ed4837305d 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: bufmgr.h,v 1.41 2000/10/20 11:01:21 vadim Exp $ + * $Id: bufmgr.h,v 1.42 2000/10/28 16:21:00 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -15,7 +15,7 @@ #define BUFMGR_H #include "storage/buf_internals.h" - +#include "access/xlogdefs.h" typedef void *Block; @@ -177,4 +177,9 @@ extern void AbortBufferIO(void); extern bool BufferIsUpdatable(Buffer buffer); extern void MarkBufferForCleanup(Buffer buffer, void (*CleanupFunc)(Buffer)); +#ifdef XLOG +extern void BufmgrCommit(void); +extern void BufferSync(void); +#endif + #endif diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h index d547f71b736..78b22f392cf 100644 --- a/src/include/storage/bufpage.h +++ b/src/include/storage/bufpage.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: bufpage.h,v 1.34 2000/10/21 15:43:36 vadim Exp $ + * $Id: bufpage.h,v 1.35 2000/10/28 16:21:00 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -118,7 +118,8 @@ typedef OpaqueData *Opaque; */ typedef struct PageHeaderData { -#ifdef XLOG +#ifdef XLOG /* XXX LSN is member of *any* block, not */ + /* only page-organized - 'll change later */ XLogRecPtr pd_lsn; /* LSN: next byte after last byte of xlog */ /* record for last change of this page */ StartUpID pd_sui; /* SUI of last changes (currently it's */ diff --git a/src/include/storage/smgr.h b/src/include/storage/smgr.h index 7caac813e9a..49a2e3e5e92 100644 --- a/src/include/storage/smgr.h +++ b/src/include/storage/smgr.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: smgr.h,v 1.22 2000/10/16 14:52:28 vadim Exp $ + * $Id: smgr.h,v 1.23 2000/10/28 16:21:00 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -36,26 +36,19 @@ extern int smgrwrite(int16 which, Relation reln, BlockNumber blocknum, char *buffer); extern int smgrflush(int16 which, Relation reln, BlockNumber blocknum, char *buffer); -#ifdef OLD_FILE_NAMING -extern int smgrblindwrt(int16 which, char *dbname, char *relname, - Oid dbid, Oid relid, - BlockNumber blkno, char *buffer, - bool dofsync); -extern int smgrblindmarkdirty(int16 which, char *dbname, char *relname, - Oid dbid, Oid relid, - BlockNumber blkno); -#else extern int smgrblindwrt(int16 which, RelFileNode rnode, BlockNumber blkno, char *buffer, bool dofsync); extern int smgrblindmarkdirty(int16 which, RelFileNode rnode, BlockNumber blkno); -#endif extern int smgrmarkdirty(int16 which, Relation reln, BlockNumber blkno); extern int smgrnblocks(int16 which, Relation reln); extern int smgrtruncate(int16 which, Relation reln, int nblocks); extern int smgrcommit(void); extern int smgrabort(void); +#ifdef XLOG +extern int smgrsync(void); +#endif /* internals: move me elsewhere -- ay 7/94 */ @@ -71,22 +64,18 @@ extern int mdread(Relation reln, BlockNumber blocknum, char *buffer); extern int mdwrite(Relation reln, BlockNumber blocknum, char *buffer); extern int mdflush(Relation reln, BlockNumber blocknum, char *buffer); extern int mdmarkdirty(Relation reln, BlockNumber blkno); -#ifdef OLD_FILE_NAMING -extern int mdblindwrt(char *dbname, char *relname, Oid dbid, Oid relid, - BlockNumber blkno, char *buffer, - bool dofsync); -extern int mdblindmarkdirty(char *dbname, char *relname, Oid dbid, Oid relid, - BlockNumber blkno); -#else extern int mdblindwrt(RelFileNode rnode, BlockNumber blkno, char *buffer, bool dofsync); extern int mdblindmarkdirty(RelFileNode rnode, BlockNumber blkno); -#endif extern int mdnblocks(Relation reln); extern int mdtruncate(Relation reln, int nblocks); extern int mdcommit(void); extern int mdabort(void); +#ifdef XLOG +extern int mdsync(void); +#endif + /* mm.c */ extern SPINLOCK MMCacheLock; |