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

Commitd1f0aa7

Browse files
committed
Fix pg_visibility regression failure with CLOBBER_CACHE_ALWAYS
Commit8e03eb9 reverted a bit too much code, reintroducing one of theissues fixed by39b66a9 - a page might have been left partially emptyafter relcache invalidation.Reported-By: Tom LaneAuthor: Masahiko SawadaDiscussion:https://postgr.es/m/822752.1623032114@sss.pgh.pa.usDiscussion:https://postgr.es/m/CAD21AoA%3D%3Df2VSw3c-Cp_y%3DWLKHMKc1D6s7g3YWsCOvgaYPpJcg%40mail.gmail.com
1 parentbfeede9 commitd1f0aa7

File tree

1 file changed

+11
-11
lines changed
  • src/backend/access/heap

1 file changed

+11
-11
lines changed

‎src/backend/access/heap/hio.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -407,19 +407,19 @@ RelationGetBufferForTuple(Relation relation, Size len,
407407
* target.
408408
*/
409409
targetBlock=GetPageWithFreeSpace(relation,targetFreeSpace);
410+
}
410411

411-
/*
412-
* If the FSM knows nothing of the rel, try the last page before we
413-
* give up and extend. This avoids one-tuple-per-page syndrome during
414-
* bootstrapping or in a recently-started system.
415-
*/
416-
if (targetBlock==InvalidBlockNumber)
417-
{
418-
BlockNumbernblocks=RelationGetNumberOfBlocks(relation);
412+
/*
413+
* If the FSM knows nothing of the rel, try the last page before we
414+
* give up and extend. This avoids one-tuple-per-page syndrome during
415+
* bootstrapping or in a recently-started system.
416+
*/
417+
if (targetBlock==InvalidBlockNumber)
418+
{
419+
BlockNumbernblocks=RelationGetNumberOfBlocks(relation);
419420

420-
if (nblocks>0)
421-
targetBlock=nblocks-1;
422-
}
421+
if (nblocks>0)
422+
targetBlock=nblocks-1;
423423
}
424424

425425
loop:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp