postgresql/src
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
..
backend Change snapshot type to be determined by enum rather than callback. 2019-01-21 17:03:15 -08:00
bin Revert "Fix under-quoted filename pattern in pgbench TAP test." 2019-01-21 11:28:03 -05:00
common Use perfect hashing, instead of binary search, for keyword lookup. 2019-01-09 19:47:46 -05:00
fe_utils pgbench: add \cset and \gset commands 2019-01-10 13:42:20 -03:00
include Change snapshot type to be determined by enum rather than callback. 2019-01-21 17:03:15 -08:00
interfaces Second try at fixing ecpglib thread-safety problem. 2019-01-21 16:17:10 -05:00
makefiles Ensure link commands list *.o files before LDFLAGS. 2019-01-02 13:57:54 -05:00
pl Use perfect hashing, instead of binary search, for keyword lookup. 2019-01-09 19:47:46 -05:00
port Use our own getopt() on OpenBSD. 2019-01-18 15:06:26 -05:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Create action triggers when partitions are detached 2019-01-21 20:08:52 -03:00
timezone Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
tools Change snapshot type to be determined by enum rather than callback. 2019-01-21 17:03:15 -08:00
tutorial Update copyright for 2019 2019-01-02 12:44:25 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in fix typo 2019-01-13 16:43:14 -05:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00