GSoC 2015 proposal: Support for microvacuum for GiST

Поиск
Список
Период
Сортировка
От Ilia Ivanicki
Тема GSoC 2015 proposal: Support for microvacuum for GiST
Дата
Msg-id CAN33H2zOBTuND4LxH7WbUyY9Lxzh7_HxCSVszrFnWiRULzL__A@mail.gmail.com
обсуждение исходный текст
Ответы Re: GSoC 2015 proposal: Support for microvacuum for GiST  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
Hi, hackers!

I want to show my proposal idea for GSoC 2015. I'm newbie to coding for PostgreSQL.

http://www.google-melange.com/gsoc/proposal/public/google/gsoc2015/ivanitskiy_ilya/5629499534213120


***
Abstract:
Currently support for microvacuum is implemented only for BTree index. But GiST index is so useful and widely used for user defined datatypes instead of btree. During index search it reads page by page. Every tuple on the page in buffer marked as "dead" if it doesn't visible for all transactions. Whenever before receiving next page we check "dead" items and mark current page as "has garbage"[1]. When the page gets full, all the killed items are removed by calling microvacuum[2].

Benefits to the PostgreSQL Community

The improvement can reduce handover time during execution VACUUM. It will be useful for high-loaded system, where PostgreSQL is used.

 

Quantifiable results    

Reducing VACUUM run time and INSERT run time for GiST.

 

Project details

I'm going to implement support for microvacuum for GiST as well as it was implemented for BTree access method, just taking into account specificity of GiST.

During IndexScan we get pages from GiST index and download elected page one by one into buffer. Every item from buffering page is checked for "dead". If item really is "dead", we write item's adress in structure BTScanOpaque in function btgettuple().  Before receiving next pafe into buffer it is started  _bt_killitems(), which checked "dead" tuples with function ItemPointerEquals(). If page contains at least one "dead" tuple, it's marked:

opaque->btpo_flags |= BTP_HAS_GARBAGE;

_bt_killitems()  is called when we want to download next page to buffer or end of IndexScan or ReScan. 

Further, when call chain is called  btinsert() -> _bt_doinsert() ->  _bt_findinsertloc(), if the page, which should be carried out insert, is marked by HAS_GARBAGE flag, then function _bt_vacuum_one_page() is started. It vacuum just one index page.

I'm going to realize such features for GiST index.

 

Project Schedule  

until May 31

Solve architecture questions with help of community.

1 June – 30 June

First, approximate implementation supporting microvacuum for GiST.

I’ve got bachelor's degree in this month so I haven’t much time to work on project.

1 July – 31 July

Implementation of supporting microvacuum for GiST and testing.

1 August -15 August

Final refactoring, testing and committing.

 

About myself

I'm last year student at Moscow Engineering and Physical Institute at department "Cybernetics".

Links

  1. http://doxygen.postgresql.org/nbtutils_8c.html#a60f25ce314f5395e6f6ae44ccbae8859
  2. http://doxygen.postgresql.org/nbtinsert_8c.html#a89450d93d20d3d5e2d1e68849b69ee32
  3. https://wiki.postgresql.org/wiki/GSoC_2015#Core

_______________________________________________________________________________

Best wishes,

Ivanitskiy Ilya.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Index-only scans with btree_gist
Следующее
От: Jerry Sievers
Дата:
Сообщение: Changing ownership of simple composite incomplete?