Обсуждение: pgsql: Move generic snapshot related code from tqual.h to snapmgr.h.

Поиск
Список
Период
Сортировка

pgsql: Move generic snapshot related code from tqual.h to snapmgr.h.

От
Andres Freund
Дата:
Move generic snapshot related code from tqual.h to snapmgr.h.

The code in tqual.c is largely heap specific. Due to the upcoming
pluggable storage work, it therefore makes sense to move it into
access/heap/ (as the file's header notes, the tqual name isn't very
good).

But the various statically allocated snapshot and snapshot
initialization functions are now (see previous commit) generic and do
not depend on functions declared in tqual.h anymore. Therefore move.
Also move XidInMVCCSnapshot as that's useful for future AMs, and
already used outside of tqual.c.

Author: Andres Freund
Discussion: https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b7eda3e0e33402a7727253e6f307ca96b92eb23d

Modified Files
--------------
contrib/amcheck/verify_nbtree.c             |   1 -
contrib/sepgsql/database.c                  |   2 +-
contrib/sepgsql/proc.c                      |   2 +-
contrib/sepgsql/relation.c                  |   2 +-
contrib/sepgsql/schema.c                    |   2 +-
src/backend/access/nbtree/nbtsort.c         |   1 -
src/backend/catalog/catalog.c               |   2 +-
src/backend/commands/async.c                |   1 -
src/backend/commands/constraint.c           |   2 +-
src/backend/executor/execIndexing.c         |   2 +-
src/backend/replication/logical/origin.c    |   2 +-
src/backend/replication/logical/snapbuild.c |   1 -
src/backend/utils/adt/selfuncs.c            |   1 -
src/backend/utils/time/snapmgr.c            | 126 ++++++++++++++++++++++++++-
src/backend/utils/time/tqual.c              | 127 ----------------------------
src/include/utils/snapmgr.h                 |  44 ++++++++++
src/include/utils/tqual.h                   |  40 ---------
17 files changed, 177 insertions(+), 181 deletions(-)