postgresql/src/backend
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
..
access Change snapshot type to be determined by enum rather than callback. 2019-01-21 17:03:15 -08:00
bootstrap Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
catalog Fix "Remove superfluous tqual.h includes" by adding back one include. 2019-01-21 12:59:31 -08:00
commands Create action triggers when partitions are detached 2019-01-21 20:08:52 -03:00
executor Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
foreign Update copyright for 2019 2019-01-02 12:44:25 -05:00
jit Make naming of tupdesc related structs more consistent with the rest of PG. 2019-01-14 16:25:50 -08:00
lib Update copyright for 2019 2019-01-02 12:44:25 -05:00
libpq Update copyright for 2019 2019-01-02 12:44:25 -05:00
main Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
nodes Allow COPY FROM to filter data using WHERE conditions 2019-01-20 00:22:14 +01:00
optimizer Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
parser Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
partitioning Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
po Translation updates 2018-06-25 12:37:18 +02:00
port Update copyright for 2019 2019-01-02 12:44:25 -05:00
postmaster Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
regex Update copyright for 2019 2019-01-02 12:44:25 -05:00
replication Change snapshot type to be determined by enum rather than callback. 2019-01-21 17:03:15 -08:00
rewrite Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
snowball Update copyright for 2019 2019-01-02 12:44:25 -05:00
statistics Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
storage Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
tcop Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsearch Update copyright for 2019 2019-01-02 12:44:25 -05:00
utils Change snapshot type to be determined by enum rather than callback. 2019-01-21 17:03:15 -08:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Ensure link commands list *.o files before LDFLAGS. 2019-01-02 13:57:54 -05:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Translation updates 2018-06-25 12:37:18 +02:00