mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Improve comments for [Heap]CheckForSerializableConflictOut().
Rewrite the documentation of these functions, in light of recent bug fix
commit 5940ffb2
.
Back-patch to 13 where the check-for-conflict-out code was split up into
AM-specific and generic parts, and new documentation was added that now
looked wrong.
Reviewed-by: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/db7b729d-0226-d162-a126-8a8ab2dc4443%40jepsen.io
This commit is contained in:
@ -8975,15 +8975,13 @@ heap_mask(char *pagedata, BlockNumber blkno)
|
||||
|
||||
/*
|
||||
* HeapCheckForSerializableConflictOut
|
||||
* We are reading a tuple which has been modified. If it is visible to
|
||||
* us but has been deleted, that indicates a rw-conflict out. If it's
|
||||
* not visible and was created by a concurrent (overlapping)
|
||||
* serializable transaction, that is also a rw-conflict out,
|
||||
* We are reading a tuple. If it's not visible, there may be a
|
||||
* rw-conflict out with the inserter. Otherwise, if it is visible to us
|
||||
* but has been deleted, there may be a rw-conflict out with the deleter.
|
||||
*
|
||||
* We will determine the top level xid of the writing transaction with which
|
||||
* we may be in conflict, and check for overlap with our own transaction.
|
||||
* If the transactions overlap (i.e., they cannot see each other's writes),
|
||||
* then we have a conflict out.
|
||||
* we may be in conflict, and ask CheckForSerializableConflictOut() to check
|
||||
* for overlap with our own transaction.
|
||||
*
|
||||
* This function should be called just about anywhere in heapam.c where a
|
||||
* tuple has been read. The caller must hold at least a shared lock on the
|
||||
|
Reference in New Issue
Block a user