Remove dependency on HeapTuple from predicate locking functions.
authorThomas Munro <tmunro@postgresql.org>
Tue, 28 Jan 2020 00:13:04 +0000 (13:13 +1300)
committerThomas Munro <tmunro@postgresql.org>
Tue, 28 Jan 2020 00:13:04 +0000 (13:13 +1300)
commit6f38d4dac381b5b8bead302a0b4f81761042cd25
tree93c4f33eb15be92bc1b24ea5bee97f1201dfbbd0
parent4589c6a2a30faba53d0655a8e3a29b54d28bb6f6
Remove dependency on HeapTuple from predicate locking functions.

The following changes make the predicate locking functions more
generic and suitable for use by future access methods:

- PredicateLockTuple() is renamed to PredicateLockTID().  It takes
  ItemPointer and inserting transaction ID instead of HeapTuple.

- CheckForSerializableConflictIn() takes blocknum instead of buffer.

- CheckForSerializableConflictOut() no longer takes HeapTuple or buffer.

Author: Ashwin Agrawal
Reviewed-by: Andres Freund, Kuntal Ghosh, Thomas Munro
Discussion: https://postgr.es/m/CALfoeiv0k3hkEb3Oqk%3DziWqtyk2Jys1UOK5hwRBNeANT_yX%2Bng%40mail.gmail.com
12 files changed:
src/backend/access/gin/ginbtree.c
src/backend/access/gin/ginfast.c
src/backend/access/gin/gininsert.c
src/backend/access/gist/gist.c
src/backend/access/hash/hashinsert.c
src/backend/access/heap/heapam.c
src/backend/access/heap/heapam_handler.c
src/backend/access/index/indexam.c
src/backend/access/nbtree/nbtinsert.c
src/backend/storage/lmgr/predicate.c
src/include/access/heapam.h
src/include/storage/predicate.h