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

Commitfe28069

Browse files
committed
Scan GiST indexes in physical order during VACUUM.
Scanning an index in physical order is faster than walking it in logicalorder, because sequential I/O is faster than random I/O. The idea and codestructure is borrowed from B-tree vacuum code.Patch by Andrey Borodin, with changes by me. Based on early work byKonstantin Kuznetsov, although the patch has been rewritten multiple timessince his original version.Discussion:https://www.postgresql.org/message-id/1B9FAC6F-FA19-4A24-8C1B-F4F574844892%40yandex-team.ru
1 parent35bc0ec commitfe28069

File tree

2 files changed

+287
-195
lines changed

2 files changed

+287
-195
lines changed

‎src/backend/access/gist/gist.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ static bool gistinserttuples(GISTInsertState *state, GISTInsertStack *stack,
3838
boolunlockbuf,boolunlockleftchild);
3939
staticvoidgistfinishsplit(GISTInsertState*state,GISTInsertStack*stack,
4040
GISTSTATE*giststate,List*splitinfo,boolreleasebuf);
41-
staticvoidgistvacuumpage(Relationrel,Pagepage,Bufferbuffer,
42-
RelationheapRel);
41+
staticvoidgistprunepage(Relationrel,Pagepage,Bufferbuffer,
42+
RelationheapRel);
4343

4444

4545
#defineROTATEDIST(d) do { \
@@ -261,7 +261,7 @@ gistplacetopage(Relation rel, Size freespace, GISTSTATE *giststate,
261261
*/
262262
if (is_split&&GistPageIsLeaf(page)&&GistPageHasGarbage(page))
263263
{
264-
gistvacuumpage(rel,page,buffer,heapRel);
264+
gistprunepage(rel,page,buffer,heapRel);
265265
is_split=gistnospace(page,itup,ntup,oldoffnum,freespace);
266266
}
267267

@@ -1544,11 +1544,11 @@ freeGISTstate(GISTSTATE *giststate)
15441544
}
15451545

15461546
/*
1547-
*gistvacuumpage() -- try to remove LP_DEAD items from the given page.
1547+
*gistprunepage() -- try to remove LP_DEAD items from the given page.
15481548
* Function assumes that buffer is exclusively locked.
15491549
*/
15501550
staticvoid
1551-
gistvacuumpage(Relationrel,Pagepage,Bufferbuffer,RelationheapRel)
1551+
gistprunepage(Relationrel,Pagepage,Bufferbuffer,RelationheapRel)
15521552
{
15531553
OffsetNumberdeletable[MaxIndexTuplesPerPage];
15541554
intndeletable=0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp