diff options
| author | Vadim B. Mikheev | 2000-11-30 08:46:26 +0000 |
|---|---|---|
| committer | Vadim B. Mikheev | 2000-11-30 08:46:26 +0000 |
| commit | 81c8c244b26011a071c89b43a38bba7039226019 (patch) | |
| tree | a0602e39901d870d1fe4275a96c70a8450710882 /src/include | |
| parent | b16516b887f058782d67c90103148544f8adbd8f (diff) | |
No more #ifdef XLOG.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/access/htup.h | 13 | ||||
| -rw-r--r-- | src/include/access/nbtree.h | 15 | ||||
| -rw-r--r-- | src/include/access/transam.h | 27 | ||||
| -rw-r--r-- | src/include/access/xact.h | 7 | ||||
| -rw-r--r-- | src/include/access/xlogutils.h | 2 | ||||
| -rw-r--r-- | src/include/config.h.in | 5 | ||||
| -rw-r--r-- | src/include/storage/buf_internals.h | 6 | ||||
| -rw-r--r-- | src/include/storage/bufmgr.h | 4 | ||||
| -rw-r--r-- | src/include/storage/bufpage.h | 10 | ||||
| -rw-r--r-- | src/include/storage/fd.h | 6 | ||||
| -rw-r--r-- | src/include/storage/smgr.h | 8 |
11 files changed, 18 insertions, 85 deletions
diff --git a/src/include/access/htup.h b/src/include/access/htup.h index 6484abf36d8..eebc1570f54 100644 --- a/src/include/access/htup.h +++ b/src/include/access/htup.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: htup.h,v 1.40 2000/11/30 01:47:32 vadim Exp $ + * $Id: htup.h,v 1.41 2000/11/30 08:46:25 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -63,11 +63,6 @@ typedef struct HeapTupleHeaderData typedef HeapTupleHeaderData *HeapTupleHeader; - -#ifdef XLOG - -/* XLOG stuff */ - /* * XLOG allows to store some information in high 4 bits of log * record xl_info field @@ -127,11 +122,6 @@ typedef struct xl_heap_update #define SizeOfHeapUpdate (offsetof(xl_heap_update, mask) + sizeof(uint8)) -/* end of XLOG stuff */ - -#endif /* XLOG */ - - /* * MaxTupleSize is the maximum allowed size of a tuple, including header and * MAXALIGN alignment padding. Basically it's BLCKSZ minus the other stuff @@ -147,7 +137,6 @@ typedef struct xl_heap_update #define MaxTupleSize \ (BLCKSZ - MAXALIGN(sizeof(PageHeaderData) + MaxSpecialSpace)) - /* * MaxAttrSize is a somewhat arbitrary upper limit on the declared size of * data fields of char(n) and similar types. It need not have anything diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 830fc657317..fa3326d4c39 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: nbtree.h,v 1.47 2000/11/21 21:16:05 petere Exp $ + * $Id: nbtree.h,v 1.48 2000/11/30 08:46:25 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -42,10 +42,7 @@ typedef struct BTPageOpaqueData #define BTP_ROOT (1 << 1) /* It's the root page (has no parent) */ #define BTP_FREE (1 << 2) /* not currently used... */ #define BTP_META (1 << 3) /* Set in the meta-page only */ - -#ifdef XLOG #define BTP_REORDER (1 << 4) /* items must be re-ordered */ -#endif } BTPageOpaqueData; typedef BTPageOpaqueData *BTPageOpaque; @@ -209,11 +206,6 @@ typedef BTStackData *BTStack; #define P_FIRSTKEY ((OffsetNumber) 2) #define P_FIRSTDATAKEY(opaque) (P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY) - -#ifdef XLOG - -/* XLOG stuff */ - /* * XLOG allows to store some information in high 4 bits of log * record xl_info field @@ -257,7 +249,6 @@ typedef struct xl_btree_insert #define SizeOfBtreeInsert (offsetof(xl_btreetid, tid) + SizeOfIptrData) - /* * This is what we need to know about insert with split - * 22 + {4 + 8 | left hi-key} + [btitem] + right sibling btitems. Note that @@ -292,10 +283,6 @@ typedef struct xl_btree_newroot #define SizeOfBtreeNewroot (offsetof(xl_btree_newroot, rootblk) + sizeof(BlockIdData)) -/* end of XLOG stuff */ - -#endif /* XLOG */ - /* * Operator strategy numbers -- ordering of these is <, <=, =, >=, > */ diff --git a/src/include/access/transam.h b/src/include/access/transam.h index f1238d5c266..0e6212eed70 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.27 2000/11/21 21:16:05 petere Exp $ + * $Id: transam.h,v 1.28 2000/11/30 08:46:25 vadim Exp $ * * NOTES * Transaction System Version 101 now support proper oid @@ -67,11 +67,7 @@ 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) /* ---------------- @@ -88,10 +84,8 @@ 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; @@ -115,9 +109,7 @@ typedef LogRelationContentsData *LogRelationContents; */ typedef struct VariableRelationContentsData { -#ifdef XLOG XLogRecPtr LSN; -#endif int TransSystemVersion; TransactionId nextXidData; TransactionId lastXidData; /* unused */ @@ -127,21 +119,14 @@ typedef struct VariableRelationContentsData typedef VariableRelationContentsData *VariableRelationContents; /* - * VariableCache is placed in shmem and used by backends to - * get next available XID & OID without access to - * variable relation. Actually, I would like to have two - * different on-disk storages for next XID and OID... - * But hoping that someday we will use per database OID - * generator I leaved this as is. - vadim 07/21/98 + * VariableCache is placed in shmem and used by + * backends to get next available XID & OID. */ typedef struct VariableCacheData { -#ifndef XLOG - uint32 xid_count; -#endif - TransactionId nextXid; - Oid nextOid; - uint32 oidCount; + TransactionId nextXid; + Oid nextOid; + uint32 oidCount; } VariableCacheData; typedef VariableCacheData *VariableCache; diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 5aab06e1159..6736942e05c 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.30 2000/11/21 21:16:05 petere Exp $ + * $Id: xact.h,v 1.31 2000/11/30 08:46:25 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -78,9 +78,6 @@ typedef TransactionStateData *TransactionState; #define StoreInvalidTransactionId(dest) \ (*((TransactionId*) (dest)) = NullTransactionId) - -#ifdef XLOG - /* * XLOG allows to store some information in high 4 bits of log * record xl_info field @@ -106,8 +103,6 @@ typedef struct xl_xact_abort #define SizeOfXactAbort ((offsetof(xl_xact_abort, xtime) + sizeof(time_t))) -#endif - /* ---------------- * extern definitions * ---------------- diff --git a/src/include/access/xlogutils.h b/src/include/access/xlogutils.h index ab5caccf322..016381f0d2b 100644 --- a/src/include/access/xlogutils.h +++ b/src/include/access/xlogutils.h @@ -1,5 +1,5 @@ - #ifndef XLOG_UTILS_H +#define XLOG_UTILS_H #include "access/rmgr.h" #include "utils/rel.h" diff --git a/src/include/config.h.in b/src/include/config.h.in index 1f6939dd960..13745c07f32 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -8,7 +8,7 @@ * or in config.h afterwards. Of course, if you edit config.h, then your * changes will be overwritten the next time you run configure. * - * $Id: config.h.in,v 1.150 2000/11/29 20:59:54 tgl Exp $ + * $Id: config.h.in,v 1.151 2000/11/30 08:46:25 vadim Exp $ */ #ifndef CONFIG_H @@ -234,9 +234,6 @@ # define HAVE_UNIX_SOCKETS 1 #endif -/* Enable WAL. Don't disable this, it was only used during development. */ -#define XLOG 1 - /* *------------------------------------------------------------------------ * These hand-configurable symbols are for enabling debugging code, diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index 41fce0780f0..e7ac9f548ca 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.45 2000/11/30 01:39:08 tgl Exp $ + * $Id: buf_internals.h,v 1.46 2000/11/30 08:46:26 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -18,7 +18,6 @@ #include "storage/lmgr.h" #include "storage/s_lock.h" - /* Buf Mgr constants */ /* in bufmgr.c */ extern int Data_Descriptors; @@ -28,7 +27,6 @@ extern int Num_Descriptors; extern int ShowPinTrace; - /* * Flags for buffer descriptors */ @@ -105,9 +103,7 @@ 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 2452ac64967..27bcc090ed9 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.45 2000/11/30 01:39:08 tgl Exp $ + * $Id: bufmgr.h,v 1.46 2000/11/30 08:46:26 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -192,10 +192,8 @@ 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 extern void InitLocalBuffer(void); diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h index f8415dbd22d..58e6b0a6df0 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.36 2000/11/20 21:12:26 vadim Exp $ + * $Id: bufpage.h,v 1.37 2000/11/30 08:46:26 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -118,13 +118,13 @@ typedef OpaqueData *Opaque; */ typedef struct PageHeaderData { -#ifdef XLOG /* XXX LSN is member of *any* block, not */ + /* 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 */ /* used by heap AM only) */ -#endif + LocationIndex pd_lower; /* offset to start of free space */ LocationIndex pd_upper; /* offset to end of free space */ LocationIndex pd_special; /* offset to start of special space */ @@ -298,8 +298,6 @@ typedef enum (sizeof(PageHeaderData) - sizeof(ItemIdData)))) \ / ((int) sizeof(ItemIdData))) -#ifdef XLOG - #define PageGetLSN(page) \ (((PageHeader) (page))->pd_lsn) #define PageSetLSN(page, lsn) \ @@ -310,8 +308,6 @@ typedef enum #define PageSetSUI(page, sui) \ (((PageHeader) (page))->pd_sui = (StartUpID) (sui)) -#endif - /* ---------------------------------------------------------------- * extern declarations * ---------------------------------------------------------------- diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h index 45ef1aedcd5..c4b1a85c354 100644 --- a/src/include/storage/fd.h +++ b/src/include/storage/fd.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: fd.h,v 1.23 2000/11/10 03:53:45 vadim Exp $ + * $Id: fd.h,v 1.24 2000/11/30 08:46:26 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -71,10 +71,6 @@ extern int BasicOpenFile(FileName fileName, int fileFlags, int fileMode); extern void closeAllVfds(void); extern void AtEOXact_Files(void); -#ifdef XLOG #define pg_fsync(fd) fsync(fd) -#else -extern int pg_fsync(int fd); -#endif #endif /* FD_H */ diff --git a/src/include/storage/smgr.h b/src/include/storage/smgr.h index 7205d5fb7b6..4e4531dd65b 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.25 2000/11/21 21:16:05 petere Exp $ + * $Id: smgr.h,v 1.26 2000/11/30 08:46:26 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -47,14 +47,11 @@ extern int smgrtruncate(int16 which, Relation reln, int nblocks); extern int smgrDoPendingDeletes(bool isCommit); extern int smgrcommit(void); extern int smgrabort(void); - -#ifdef XLOG extern int smgrsync(void); extern void smgr_redo(XLogRecPtr lsn, XLogRecord *record); extern void smgr_undo(XLogRecPtr lsn, XLogRecord *record); extern void smgr_desc(char *buf, uint8 xl_info, char* rec); -#endif /* internals: move me elsewhere -- ay 7/94 */ @@ -77,10 +74,7 @@ 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; |
