diff options
| author | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-07-27 19:38:40 +0000 |
|---|---|---|
| committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-07-27 19:38:40 +0000 |
| commit | be8300b18f26363c0b18c62fa884a6a62e26405e (patch) | |
| tree | a44ac3f51d81a7616bd9c7912fa23a5e81c9d483 /src/include/access | |
| parent | f7f989c9907b181f1785c699e6384e6eba8ae9a5 (diff) | |
| download | postgresql-be8300b18f26363c0b18c62fa884a6a62e26405e.tar.gz | |
Use Snapshot in heap access methods.
Diffstat (limited to 'src/include/access')
| -rw-r--r-- | src/include/access/heapam.h | 7 | ||||
| -rw-r--r-- | src/include/access/relscan.h | 5 | ||||
| -rw-r--r-- | src/include/access/xact.h | 22 |
3 files changed, 22 insertions, 12 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index f0fff75d4c..a28d06db98 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.33 1998/06/15 18:39:53 momjian Exp $ + * $Id: heapam.h,v 1.34 1998/07/27 19:38:29 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -18,6 +18,7 @@ #include <access/relscan.h> #include <storage/block.h> #include <utils/rel.h> +#include <utils/tqual.h> /* ---------------------------------------------------------------- * heap access method statistics @@ -247,11 +248,11 @@ extern Relation heap_openr(char *relationName); extern void heap_close(Relation relation); extern HeapScanDesc heap_beginscan(Relation relation, int atend, - bool seeself, unsigned nkeys, ScanKey key); + Snapshot snapshot, unsigned nkeys, ScanKey key); extern void heap_rescan(HeapScanDesc sdesc, bool scanFromEnd, ScanKey key); extern void heap_endscan(HeapScanDesc sdesc); extern HeapTuple heap_getnext(HeapScanDesc scandesc, int backw, Buffer *b); -extern HeapTuple heap_fetch(Relation relation, bool seeself, ItemPointer tid, Buffer *b); +extern HeapTuple heap_fetch(Relation relation, Snapshot snapshot, ItemPointer tid, Buffer *b); extern Oid heap_insert(Relation relation, HeapTuple tup); extern int heap_delete(Relation relation, ItemPointer tid); extern int diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h index f8d0aed604..efb970b44b 100644 --- a/src/include/access/relscan.h +++ b/src/include/access/relscan.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: relscan.h,v 1.10 1997/11/24 05:09:39 momjian Exp $ + * $Id: relscan.h,v 1.11 1998/07/27 19:38:29 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -16,6 +16,7 @@ #include <storage/buf.h> #include <utils/rel.h> #include <access/htup.h> +#include <utils/tqual.h> typedef ItemPointerData MarkData; @@ -32,8 +33,8 @@ typedef struct HeapScanDescData ItemPointerData rs_mctid; /* marked current tid */ ItemPointerData rs_mntid; /* marked next tid */ ItemPointerData rs_mcd; /* marked current delta XXX ??? */ + Snapshot rs_snapshot; /* snapshot to see */ bool rs_atend; /* restart scan at end? */ - bool rs_seeself; /* see self or not */ uint16 rs_cdelta; /* current delta in chain */ uint16 rs_nkeys; /* number of attributes in keys */ ScanKey rs_key; /* key descriptors */ diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 7abcb63e69..fa24882061 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.13 1998/04/24 14:42:55 momjian Exp $ + * $Id: xact.h,v 1.14 1998/07/27 19:38:30 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -22,14 +22,22 @@ */ typedef struct TransactionStateData { - TransactionId transactionIdData; - CommandId commandId; - CommandId scanCommandId; - AbsoluteTime startTime; - int state; - int blockState; + TransactionId transactionIdData; + CommandId commandId; + CommandId scanCommandId; + AbsoluteTime startTime; + int state; + int blockState; } TransactionStateData; +/* + * Xact isolation levels + */ +#define XACT_DIRTY_READ 0 /* not implemented */ +#define XACT_READ_COMMITTED 1 +#define XACT_REPEATABLE_READ 2 /* not implemented */ +#define XACT_SERIALIZED 3 + /* ---------------- * transaction states * ---------------- |
