mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
You must hold a lock on the heap page when you call
CheckForSerializableConflictOut(), because it can set hint bits. YAMAMOTO Takashi
This commit is contained in:
parent
12bf602f3f
commit
ee3838b1d3
@ -1472,10 +1472,10 @@ heap_fetch(Relation relation,
|
|||||||
if (valid)
|
if (valid)
|
||||||
PredicateLockTuple(relation, tuple);
|
PredicateLockTuple(relation, tuple);
|
||||||
|
|
||||||
LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
|
|
||||||
|
|
||||||
CheckForSerializableConflictOut(valid, relation, tuple, buffer);
|
CheckForSerializableConflictOut(valid, relation, tuple, buffer);
|
||||||
|
|
||||||
|
LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
|
||||||
|
|
||||||
if (valid)
|
if (valid)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -3366,9 +3366,10 @@ XidIsConcurrent(TransactionId xid)
|
|||||||
* If the transactions overlap (i.e., they cannot see each other's writes),
|
* If the transactions overlap (i.e., they cannot see each other's writes),
|
||||||
* then we have a conflict out.
|
* then we have a conflict out.
|
||||||
*
|
*
|
||||||
* This function should be called just about anywhere in heapam.c that a
|
* This function should be called just about anywhere in heapam.c where a
|
||||||
* tuple has been read. There is currently no known reason to call this
|
* tuple has been read. The caller must hold at least a shared lock on the
|
||||||
* function from an index AM.
|
* buffer, because this function might set hint bits on the tuple. There is
|
||||||
|
* currently no known reason to call this function from an index AM.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
CheckForSerializableConflictOut(const bool visible, const Relation relation,
|
CheckForSerializableConflictOut(const bool visible, const Relation relation,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user