postgresql/src/backend/access
Andres Freund 63746189b2 Change snapshot type to be determined by enum rather than callback.
This is in preparation for allowing the same snapshot be used for
different table AMs. With the current callback based approach we would
need one callback for each supported AM, which clearly would not be
extensible.  Thus add a new Snapshot->snapshot_type field, and move
the dispatch into HeapTupleSatisfiesVisibility() (which is now a
function). Later work will then dispatch calls to
HeapTupleSatisfiesVisibility() and other AMs visibility functions
depending on the type of the table.  The central SnapshotType enum
also seems like a good location to centralize documentation about the
intended behaviour of various types of snapshots.

As tqual.h isn't included by bufmgr.h any more (as HeapTupleSatisfies*
isn't referenced by TestForOldSnapshot() anymore) a few files now need
to include it directly.

Author: Andres Freund, loosely based on earlier work by Haribabu Kommi
Discussion:
    https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de
    https://postgr.es/m/20160812231527.GA690404@alvherre.pgsql
2019-01-21 17:03:15 -08:00
..
brin Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
common Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00
gin Update copyright for 2019 2019-01-02 12:44:25 -05:00
gist Update copyright for 2019 2019-01-02 12:44:25 -05:00
hash Replace heapam.h includes with {table, relation}.h where applicable. 2019-01-21 10:51:37 -08:00
heap Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
index Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
nbtree Change snapshot type to be determined by enum rather than callback. 2019-01-21 17:03:15 -08:00
rmgrdesc Update copyright for 2019 2019-01-02 12:44:25 -05:00
spgist Update copyright for 2019 2019-01-02 12:44:25 -05:00
table Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00
tablesample Don't include heapam.h from others headers. 2019-01-14 16:24:41 -08:00
transam Restrict the use of temporary namespace in two-phase transactions 2019-01-18 09:21:44 +09:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00