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

Commite9e441c

Browse files
committed
Prevent mark as deleted and as 'has free space' page in bloom module
Vacuum might put page into list of pages with some free space and mark asdeleted at the same time.
1 parent80afb62 commite9e441c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎contrib/bloom/blvacuum.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,20 @@ blbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
108108
Assert(itupPtr==BloomPageGetTuple(&state,page,
109109
OffsetNumberNext(BloomPageGetMaxOffset(page))));
110110

111-
if (BloomPageGetFreeSpace(&state,page)>state.sizeOfBloomTuple&&
111+
/*
112+
* Add page to notFullPage list if we will not mark page as deleted and
113+
* there is a free space on it
114+
*/
115+
if (BloomPageGetMaxOffset(page)==0&&
116+
BloomPageGetFreeSpace(&state,page)>state.sizeOfBloomTuple&&
112117
countPage<BloomMetaBlockN)
113118
notFullPage[countPage++]=blkno;
114119

115120
/* Did we delete something? */
116121
if (itupPtr!=itup)
117122
{
118123
/* Is it empty page now? */
119-
if (itupPtr==BloomPageGetData(page))
124+
if (BloomPageGetMaxOffset(page)==0)
120125
BloomPageSetDeleted(page);
121126
/* Adjust pg_lower */
122127
((PageHeader)page)->pd_lower= (Pointer)itupPtr-page;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp