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

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Move generic snapshot related code from tqual.h to snapmgr.h.
Date: 2019-01-22 01:15:36
Message-ID: E1glkfA-0006ns-PW@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2019-01-22 01:44:00 pgsql: Rename RelationData.rd_amroutine to rd_indam.
Previous Message Tom Lane 2019-01-21 23:33:54 pgsql: Remove useless bms_copy step in RelationGetIndexAttrBitmap.