mirror of
https://github.com/postgres/postgres.git
synced 2025-05-11 05:41:32 +03:00
Update btree_xlog_delete() comments.
Commit fe97c61c updated LP_DEAD item deletion comments, but missed a minor discrepancy on the REDO side. Fix it now. In passing, don't talk about the btree_xlog_vacuum() behavior within btree_xlog_delete(). The reliance on XLOG_HEAP2_CLEANUP_INFO records for recovery conflicts is already discussed within btvacuumpage() and mentioned again in passing above btree_xlog_vacuum(), which seems sufficient.
This commit is contained in:
parent
7559d8ebfa
commit
c5f3b53b0e
@ -1208,9 +1208,10 @@ restart:
|
|||||||
* as long as the callback function only considers whether the
|
* as long as the callback function only considers whether the
|
||||||
* index tuple refers to pre-cutoff heap tuples that were
|
* index tuple refers to pre-cutoff heap tuples that were
|
||||||
* certainly already pruned away during VACUUM's initial heap
|
* certainly already pruned away during VACUUM's initial heap
|
||||||
* scan by the time we get here. (We can rely on conflicts
|
* scan by the time we get here. (XLOG_HEAP2_CLEANUP_INFO
|
||||||
* produced by heap pruning, rather than producing our own
|
* records produce conflicts using a latestRemovedXid value
|
||||||
* now.)
|
* for the entire VACUUM, so there is no need to produce our
|
||||||
|
* own conflict now.)
|
||||||
*
|
*
|
||||||
* Backends with snapshots acquired after a VACUUM starts but
|
* Backends with snapshots acquired after a VACUUM starts but
|
||||||
* before it finishes could have a RecentGlobalXmin with a
|
* before it finishes could have a RecentGlobalXmin with a
|
||||||
|
@ -428,14 +428,7 @@ btree_xlog_delete(XLogReaderState *record)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If we have any conflict processing to do, it must happen before we
|
* If we have any conflict processing to do, it must happen before we
|
||||||
* update the page.
|
* update the page
|
||||||
*
|
|
||||||
* Btree delete records can conflict with standby queries. You might
|
|
||||||
* think that vacuum records would conflict as well, but we've handled
|
|
||||||
* that already. XLOG_HEAP2_CLEANUP_INFO records provide the highest xid
|
|
||||||
* cleaned by the vacuum of the heap and so we can resolve any conflicts
|
|
||||||
* just once when that arrives. After that we know that no conflicts
|
|
||||||
* exist from individual btree vacuum records on that index.
|
|
||||||
*/
|
*/
|
||||||
if (InHotStandby)
|
if (InHotStandby)
|
||||||
{
|
{
|
||||||
@ -463,10 +456,7 @@ btree_xlog_delete(XLogReaderState *record)
|
|||||||
PageIndexMultiDelete(page, unused, xlrec->nitems);
|
PageIndexMultiDelete(page, unused, xlrec->nitems);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Mark the page as not containing any LP_DEAD items */
|
||||||
* Mark the page as not containing any LP_DEAD items --- see comments
|
|
||||||
* in _bt_delitems_delete().
|
|
||||||
*/
|
|
||||||
opaque = (BTPageOpaque) PageGetSpecialPointer(page);
|
opaque = (BTPageOpaque) PageGetSpecialPointer(page);
|
||||||
opaque->btpo_flags &= ~BTP_HAS_GARBAGE;
|
opaque->btpo_flags &= ~BTP_HAS_GARBAGE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user