Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc5f3b53

Browse files
Update btree_xlog_delete() comments.
Commitfe97c61 updated LP_DEAD item deletion comments, but missed aminor discrepancy on the REDO side. Fix it now.In passing, don't talk about the btree_xlog_vacuum() behavior withinbtree_xlog_delete(). The reliance on XLOG_HEAP2_CLEANUP_INFO recordsfor recovery conflicts is already discussed within btvacuumpage() andmentioned again in passing above btree_xlog_vacuum(), which seemssufficient.
1 parent7559d8e commitc5f3b53

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

‎src/backend/access/nbtree/nbtree.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,9 +1208,10 @@ btvacuumpage(BTVacState *vstate, BlockNumber blkno, BlockNumber orig_blkno)
12081208
* as long as the callback function only considers whether the
12091209
* index tuple refers to pre-cutoff heap tuples that were
12101210
* certainly already pruned away during VACUUM's initial heap
1211-
* scan by the time we get here. (We can rely on conflicts
1212-
* produced by heap pruning, rather than producing our own
1213-
* now.)
1211+
* scan by the time we get here. (XLOG_HEAP2_CLEANUP_INFO
1212+
* records produce conflicts using a latestRemovedXid value
1213+
* for the entire VACUUM, so there is no need to produce our
1214+
* own conflict now.)
12141215
*
12151216
* Backends with snapshots acquired after a VACUUM starts but
12161217
* before it finishes could have a RecentGlobalXmin with a

‎src/backend/access/nbtree/nbtxlog.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -428,14 +428,7 @@ btree_xlog_delete(XLogReaderState *record)
428428

429429
/*
430430
* If we have any conflict processing to do, it must happen before we
431-
* update the page.
432-
*
433-
* Btree delete records can conflict with standby queries. You might
434-
* think that vacuum records would conflict as well, but we've handled
435-
* that already. XLOG_HEAP2_CLEANUP_INFO records provide the highest xid
436-
* cleaned by the vacuum of the heap and so we can resolve any conflicts
437-
* just once when that arrives. After that we know that no conflicts
438-
* exist from individual btree vacuum records on that index.
431+
* update the page
439432
*/
440433
if (InHotStandby)
441434
{
@@ -463,10 +456,7 @@ btree_xlog_delete(XLogReaderState *record)
463456
PageIndexMultiDelete(page,unused,xlrec->nitems);
464457
}
465458

466-
/*
467-
* Mark the page as not containing any LP_DEAD items --- see comments
468-
* in _bt_delitems_delete().
469-
*/
459+
/* Mark the page as not containing any LP_DEAD items */
470460
opaque= (BTPageOpaque)PageGetSpecialPointer(page);
471461
opaque->btpo_flags &= ~BTP_HAS_GARBAGE;
472462

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp