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/access | |
parent | 2f4c9d39febec0c092388b124bf3de2d857eb5a9 (diff) | |
download | postgresql-5b0740d3fcd55f6e545e8bd577fe8ccba2be4987.tar.gz postgresql-5b0740d3fcd55f6e545e8bd577fe8ccba2be4987.zip |
WAL
Diffstat (limited to 'src/include/access')
-rw-r--r-- | src/include/access/transam.h | 13 | ||||
-rw-r--r-- | src/include/access/xact.h | 4 | ||||
-rw-r--r-- | src/include/access/xlog.h | 14 | ||||
-rw-r--r-- | src/include/access/xlogdefs.h | 24 | ||||
-rw-r--r-- | src/include/access/xlogutils.h | 4 |
5 files changed, 44 insertions, 15 deletions
diff --git a/src/include/access/transam.h b/src/include/access/transam.h index 752682ca969..415ad56b959 100644 --- a/src/include/access/transam.h +++ b/src/include/access/transam.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: transam.h,v 1.24 2000/01/26 05:57:51 momjian Exp $ + * $Id: transam.h,v 1.25 2000/10/28 16:20:59 vadim Exp $ * * NOTES * Transaction System Version 101 now support proper oid @@ -67,7 +67,11 @@ typedef unsigned char XidStatus;/* (2 bits) */ * transaction page definitions * ---------------- */ +#ifdef XLOG +#define TP_DataSize (BLCKSZ - sizeof(XLogRecPtr)) +#else #define TP_DataSize BLCKSZ +#endif #define TP_NumXidStatusPerBlock (TP_DataSize * 4) /* ---------------- @@ -84,6 +88,10 @@ typedef unsigned char XidStatus;/* (2 bits) */ */ typedef struct LogRelationContentsData { +#ifdef XLOG + XLogRecPtr LSN; /* temp hack: LSN is member of any block */ + /* so should be described in bufmgr */ +#endif int TransSystemVersion; } LogRelationContentsData; @@ -107,6 +115,9 @@ typedef LogRelationContentsData *LogRelationContents; */ typedef struct VariableRelationContentsData { +#ifdef XLOG + XLogRecPtr LSN; +#endif int TransSystemVersion; TransactionId nextXidData; TransactionId lastXidData; /* unused */ diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 712e88b6005..18ca96f3d83 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: xact.h,v 1.28 2000/10/20 11:01:14 vadim Exp $ + * $Id: xact.h,v 1.29 2000/10/28 16:20:59 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -135,6 +135,8 @@ extern bool IsTransactionBlock(void); extern void UserAbortTransactionBlock(void); extern void AbortOutOfAnyTransaction(void); +extern void RecordTransactionCommit(void); + extern TransactionId DisabledTransactionId; extern void XactPushRollback(void (*func) (void *), void* data); diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index c77c1cac02a..02998755c32 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -10,12 +10,7 @@ #include "access/rmgr.h" #include "access/transam.h" - -typedef struct XLogRecPtr -{ - uint32 xlogid; /* log file #, 0 based */ - uint32 xrecoff; /* offset of record in log file */ -} XLogRecPtr; +#include "access/xlogdefs.h" typedef struct XLogRecord { @@ -83,12 +78,7 @@ typedef XLogPageHeaderData *XLogPageHeader; #define XLByteEQ(left, right) \ (right.xlogid == left.xlogid && right.xrecoff == left.xrecoff) -/* - * StartUpID (SUI) - system startups counter. - * It's to allow removing pg_log after shutdown. - */ -typedef uint32 StartUpID; -extern StartUpID ThisStartUpID; +extern StartUpID ThisStartUpID; /* current SUI */ extern bool InRecovery; extern XLogRecPtr MyLastRecPtr; diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h new file mode 100644 index 00000000000..ce1b3ef8cf6 --- /dev/null +++ b/src/include/access/xlogdefs.h @@ -0,0 +1,24 @@ +/* + * + * xlogdefs.h + * + * Postgres transaction log manager record pointer and + * system stratup number definitions + * + */ +#ifndef XLOG_DEFS_H +#define XLOG_DEFS_H + +typedef struct XLogRecPtr +{ + uint32 xlogid; /* log file #, 0 based */ + uint32 xrecoff; /* offset of record in log file */ +} XLogRecPtr; + +/* + * StartUpID (SUI) - system startups counter. It's to allow removing + * pg_log after shutdown, in future. + */ +typedef uint32 StartUpID; + +#endif /* XLOG_DEFS_H */ diff --git a/src/include/access/xlogutils.h b/src/include/access/xlogutils.h index f62f726d831..b8fa3549f42 100644 --- a/src/include/access/xlogutils.h +++ b/src/include/access/xlogutils.h @@ -9,8 +9,10 @@ extern bool XLogIsValidTuple(RelFileNode hnode, ItemPointer iptr); extern void XLogOpenLogRelation(void); -extern Buffer XLogReadBuffer(bool extend, Relation reln, BlockNumber blkno); +extern void XLogInitRelationCache(void); extern void XLogCloseRelationCache(void); + extern Relation XLogOpenRelation(bool redo, RmgrId rmid, RelFileNode rnode); +extern Buffer XLogReadBuffer(bool extend, Relation reln, BlockNumber blkno); #endif |