diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-06-08 18:23:53 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-06-08 18:23:53 +0000 |
| commit | a04a423599b347325f9a73dfb2d533b24e1cbab3 (patch) | |
| tree | 5aeb620900a705222eb202c7b4b1d33266d1c190 /src/include/access/heapam.h | |
| parent | 6d6d14b6d52f7a709fba8fd23244a7de014f2048 (diff) | |
| download | postgresql-a04a423599b347325f9a73dfb2d533b24e1cbab3.tar.gz | |
Arrange for large sequential scans to synchronize with each other, so that
when multiple backends are scanning the same relation concurrently, each page
is (ideally) read only once.
Jeff Davis, with review by Heikki and Tom.
Diffstat (limited to 'src/include/access/heapam.h')
| -rw-r--r-- | src/include/access/heapam.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index ebb2e984c2..206159bdad 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.124 2007/05/27 03:50:39 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.125 2007/06/08 18:23:53 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -112,6 +112,13 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, ) +typedef enum +{ + LockTupleShared, + LockTupleExclusive +} LockTupleMode; + + /* ---------------- * function prototypes for heap access method * @@ -120,14 +127,7 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, * ---------------- */ -/* heapam.c */ - -typedef enum -{ - LockTupleShared, - LockTupleExclusive -} LockTupleMode; - +/* in heap/heapam.c */ extern Relation relation_open(Oid relationId, LOCKMODE lockmode); extern Relation try_relation_open(Oid relationId, LOCKMODE lockmode); extern Relation relation_open_nowait(Oid relationId, LOCKMODE lockmode); @@ -240,4 +240,10 @@ extern HeapTuple heap_addheader(int natts, bool withoid, extern void heap_sync(Relation relation); +/* in heap/syncscan.c */ +extern void ss_report_location(Relation rel, BlockNumber location); +extern BlockNumber ss_get_location(Relation rel, BlockNumber relnblocks); +extern void SyncScanShmemInit(void); +extern Size SyncScanShmemSize(void); + #endif /* HEAPAM_H */ |
