diff options
| author | Vadim B. Mikheev | 1998-12-15 12:47:01 +0000 |
|---|---|---|
| committer | Vadim B. Mikheev | 1998-12-15 12:47:01 +0000 |
| commit | 3f7fbf85dc5b42dfd33c803efe6c90533773576a (patch) | |
| tree | df8f84075ae7a27fa6b7ec0d063a03898e0b1bbb /src/include/access | |
| parent | c5a27161a188b235ce3c0afb1b12e8942ac8e963 (diff) | |
Initial MVCC code.
New code for locking buffer' context.
Diffstat (limited to 'src/include/access')
| -rw-r--r-- | src/include/access/heapam.h | 16 | ||||
| -rw-r--r-- | src/include/access/hio.h | 6 | ||||
| -rw-r--r-- | src/include/access/htup.h | 3 | ||||
| -rw-r--r-- | src/include/access/xact.h | 4 |
4 files changed, 15 insertions, 14 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 0c756e0beba..e883c7f0a50 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: heapam.h,v 1.39 1998/11/27 19:33:31 vadim Exp $ + * $Id: heapam.h,v 1.40 1998/12/15 12:46:44 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -42,6 +42,7 @@ typedef struct HeapAccessStatisticsData int global_insert; int global_delete; int global_replace; + int global_mark4update; int global_markpos; int global_restrpos; int global_BufferGetRelation; @@ -64,6 +65,7 @@ typedef struct HeapAccessStatisticsData int local_insert; int local_delete; int local_replace; + int local_mark4update; int local_markpos; int local_restrpos; int local_BufferGetRelation; @@ -253,9 +255,10 @@ extern void heap_endscan(HeapScanDesc scan); extern HeapTuple heap_getnext(HeapScanDesc scandesc, int backw); extern void heap_fetch(Relation relation, Snapshot snapshot, HeapTuple tup, Buffer *userbuf); extern Oid heap_insert(Relation relation, HeapTuple tup); -extern int heap_delete(Relation relation, ItemPointer tid); -extern int heap_replace(Relation relation, ItemPointer otid, - HeapTuple tup); +extern int heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid); +extern int heap_replace(Relation relation, ItemPointer otid, HeapTuple tup, + ItemPointer ctid); +extern int heap_mark4update(Relation relation, HeapTuple tup, Buffer *userbuf); extern void heap_markpos(HeapScanDesc scan); extern void heap_restrpos(HeapScanDesc scan); @@ -281,9 +284,4 @@ HeapTuple heap_addheader(uint32 natts, int structlen, char *structure); extern void PrintHeapAccessStatistics(HeapAccessStatistics stats); extern void initam(void); -/* hio.c */ -extern void RelationPutHeapTuple(Relation relation, BlockNumber blockIndex, - HeapTuple tuple); -extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple); - #endif /* HEAPAM_H */ diff --git a/src/include/access/hio.h b/src/include/access/hio.h index caa5380083d..eb8a955b4d0 100644 --- a/src/include/access/hio.h +++ b/src/include/access/hio.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: hio.h,v 1.8 1998/09/01 04:34:13 momjian Exp $ + * $Id: hio.h,v 1.9 1998/12/15 12:46:45 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -17,8 +17,8 @@ #include <utils/rel.h> -extern void RelationPutHeapTuple(Relation relation, BlockNumber blockIndex, - HeapTuple tuple); +extern void RelationPutHeapTuple(Relation relation, Buffer buffer, + HeapTuple tuple); extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple); #endif /* HIO_H */ diff --git a/src/include/access/htup.h b/src/include/access/htup.h index 56197048ba0..06c62a9a4d9 100644 --- a/src/include/access/htup.h +++ b/src/include/access/htup.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: htup.h,v 1.11 1998/11/27 19:33:31 vadim Exp $ + * $Id: htup.h,v 1.12 1998/12/15 12:46:46 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -116,6 +116,7 @@ typedef HeapTupleData *HeapTuple; #define HEAP_XMIN_INVALID 0x0200 /* t_xmin invalid/aborted */ #define HEAP_XMAX_COMMITTED 0x0400 /* t_xmax committed */ #define HEAP_XMAX_INVALID 0x0800 /* t_xmax invalid/aborted */ +#define HEAP_MARKED_FOR_UPDATE 0x1000 /* marked for UPDATE */ #define HEAP_XACT_MASK 0x0F00 /* */ diff --git a/src/include/access/xact.h b/src/include/access/xact.h index e4c1e0a88ce..6b0aae443f0 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: xact.h,v 1.17 1998/10/08 18:30:23 momjian Exp $ + * $Id: xact.h,v 1.18 1998/12/15 12:46:47 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -38,6 +38,8 @@ typedef struct TransactionStateData #define XACT_REPEATABLE_READ 2 /* not implemented */ #define XACT_SERIALIZED 3 +extern int XactIsoLevel; + /* ---------------- * transaction states * ---------------- |
