Commit 81fbbfe
committed
Fix bugs in SSI tuple locking.
1. In heap_hot_search_buffer(), the PredicateLockTuple() call is passed
wrong offset number. heapTuple->t_self is set to the tid of the first
tuple in the chain that's visited, not the one actually being read.
2. CheckForSerializableConflictIn() uses the tuple's t_ctid field
instead of t_self to check for exiting predicate locks on the tuple. If
the tuple was updated, but the updater rolled back, t_ctid points to the
aborted dead tuple.
Reported by Hannu Krosing. Backpatch to 9.1.1 parent 0b109c8 commit 81fbbfe
2 files changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1688 | 1688 | | |
1689 | 1689 | | |
1690 | 1690 | | |
| 1691 | + | |
| 1692 | + | |
1691 | 1693 | | |
1692 | 1694 | | |
1693 | 1695 | | |
| |||
1717 | 1719 | | |
1718 | 1720 | | |
1719 | 1721 | | |
1720 | | - | |
| 1722 | + | |
1721 | 1723 | | |
1722 | 1724 | | |
1723 | 1725 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4279 | 4279 | | |
4280 | 4280 | | |
4281 | 4281 | | |
4282 | | - | |
4283 | | - | |
| 4282 | + | |
| 4283 | + | |
4284 | 4284 | | |
4285 | 4285 | | |
4286 | 4286 | | |
| |||
0 commit comments