forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitce2cee0
committed
Fix nbtree kill_prior_tuple posting list assert.
An assertion added by commit0d861bb checked that _bt_killitems() onlyprocesses a BTScanPosItem whose heap TID is contained in a posting listtuple when its page offset number still matches what is on the page(i.e. when it matches the posting list tuple's current offset number).This was only correct in the common case where the page can't havechanged since we first read it. It was not correct in cases where wedon't drop the buffer pin (and don't need to verify the page hasn'tchanged using its LSN). The latter category includes scans involvingunlogged tables, and scans that use a non-MVCC snapshot, per the logicoriginally introduced by commit2ed5b87.The assertion still seems helpful. Fix it by taking cases where thepage may have been concurrently modified into account.Reported-By: Anastasia Lubennikova, Alexander LakhinDiscussion:https://postgr.es/m/c4e38e9a-0f9c-8e53-e639-adf343f94472@postgrespro.ru1 parent7d6d82a commitce2cee0
1 file changed
+21
-5
lines changedLines changed: 21 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1725 | 1725 |
| |
1726 | 1726 |
| |
1727 | 1727 |
| |
| 1728 | + | |
1728 | 1729 |
| |
1729 | 1730 |
| |
1730 | 1731 |
| |
| |||
1742 | 1743 |
| |
1743 | 1744 |
| |
1744 | 1745 |
| |
| 1746 | + | |
1745 | 1747 |
| |
1746 | 1748 |
| |
1747 | 1749 |
| |
| |||
1750 | 1752 |
| |
1751 | 1753 |
| |
1752 | 1754 |
| |
| 1755 | + | |
1753 | 1756 |
| |
1754 | 1757 |
| |
1755 | 1758 |
| |
| |||
1795 | 1798 |
| |
1796 | 1799 |
| |
1797 | 1800 |
| |
1798 |
| - | |
1799 |
| - | |
1800 |
| - | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
1801 | 1813 |
| |
1802 | 1814 |
| |
1803 | 1815 |
| |
| |||
1806 | 1818 |
| |
1807 | 1819 |
| |
1808 | 1820 |
| |
1809 |
| - | |
1810 |
| - | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
1811 | 1827 |
| |
1812 | 1828 |
| |
1813 | 1829 |
| |
|
0 commit comments
Comments
(0)