diff options
Diffstat (limited to 'src/include/access')
| -rw-r--r-- | src/include/access/heapam.h | 4 | ||||
| -rw-r--r-- | src/include/access/relscan.h | 1 | ||||
| -rw-r--r-- | src/include/access/twophase_rmgr.h | 5 | ||||
| -rw-r--r-- | src/include/access/xact.h | 15 |
4 files changed, 19 insertions, 6 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 9efab4c5003..4dbc3937099 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -82,8 +82,8 @@ extern HeapTuple heap_getnext(HeapScanDesc scan, ScanDirection direction); extern bool heap_fetch(Relation relation, Snapshot snapshot, HeapTuple tuple, Buffer *userbuf, bool keep_buf, Relation stats_relation); -extern bool heap_hot_search_buffer(ItemPointer tid, Buffer buffer, - Snapshot snapshot, bool *all_dead); +extern bool heap_hot_search_buffer(ItemPointer tid, Relation relation, + Buffer buffer, Snapshot snapshot, bool *all_dead); extern bool heap_hot_search(ItemPointer tid, Relation relation, Snapshot snapshot, bool *all_dead); diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h index 989dc576856..f703280b272 100644 --- a/src/include/access/relscan.h +++ b/src/include/access/relscan.h @@ -35,6 +35,7 @@ typedef struct HeapScanDescData BlockNumber rs_startblock; /* block # to start at */ BufferAccessStrategy rs_strategy; /* access strategy for reads */ bool rs_syncscan; /* report location to syncscan logic? */ + bool rs_relpredicatelocked; /* predicate lock on relation exists */ /* scan current state */ bool rs_inited; /* false = scan not init'd yet */ diff --git a/src/include/access/twophase_rmgr.h b/src/include/access/twophase_rmgr.h index a541d0fce79..1c7d8bb4c03 100644 --- a/src/include/access/twophase_rmgr.h +++ b/src/include/access/twophase_rmgr.h @@ -23,8 +23,9 @@ typedef uint8 TwoPhaseRmgrId; */ #define TWOPHASE_RM_END_ID 0 #define TWOPHASE_RM_LOCK_ID 1 -#define TWOPHASE_RM_PGSTAT_ID 2 -#define TWOPHASE_RM_MULTIXACT_ID 3 +#define TWOPHASE_RM_PREDICATELOCK_ID 2 +#define TWOPHASE_RM_PGSTAT_ID 3 +#define TWOPHASE_RM_MULTIXACT_ID 4 #define TWOPHASE_RM_MAX_ID TWOPHASE_RM_MULTIXACT_ID extern const TwoPhaseCallback twophase_recover_callbacks[]; diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 902e99e815c..1685a0167f5 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -32,15 +32,26 @@ extern int DefaultXactIsoLevel; extern int XactIsoLevel; /* - * We only implement two isolation levels internally. This macro should - * be used to check which one is selected. + * We implement three isolation levels internally. + * The two stronger ones use one snapshot per database transaction; + * the others use one snapshot per statement. + * Serializable uses predicate locks in addition to snapshots. + * These macros should be used to check which isolation level is selected. */ #define IsolationUsesXactSnapshot() (XactIsoLevel >= XACT_REPEATABLE_READ) +#define IsolationIsSerializable() (XactIsoLevel == XACT_SERIALIZABLE) /* Xact read-only state */ extern bool DefaultXactReadOnly; extern bool XactReadOnly; +/* + * Xact is deferrable -- only meaningful (currently) for read only + * SERIALIZABLE transactions + */ +extern bool DefaultXactDeferrable; +extern bool XactDeferrable; + /* Asynchronous commits */ extern bool XactSyncCommit; |
