Re: FSM versus GIN pending list bloat

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: FSM versus GIN pending list bloat
Дата
Msg-id CANP8+jK+=HxxrDL7ZPyzkgHfE1onmQ=z5sVML0qWmA4pLqhjrQ@mail.gmail.com
обсуждение исходный текст
Ответ на FSM versus GIN pending list bloat  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: FSM versus GIN pending list bloat  (Simon Riggs <simon@2ndQuadrant.com>)
Re: FSM versus GIN pending list bloat  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
On 4 August 2015 at 06:03, Jeff Janes <jeff.janes@gmail.com> wrote:
 
The attached proof of concept patch greatly improves the bloat for both the insert and the update cases.  You need to turn on both features: adding the pages to fsm, and vacuuming the fsm, to get the benefit (so JJ_GIN=3).  The first of those two things could probably be adopted for real, but the second probably is not acceptable.  What is the right way to do this?  Could a variant of RecordFreeIndexPage bubble the free space up the map immediately rather than waiting for a vacuum?  It would only have to move up until it found a page with freespace already recorded in it, which the vast majority of the time would mean observing up one level and then not writing to it, assuming the pending list pages remain well clustered.

You make a good case for action here since insert only tables with GIN indexes on text are a common use case for GIN. 

Why would vacuuming the FSM be unacceptable? With a large gin_pending_list_limit it makes sense.

If it is unacceptable, perhaps we can avoid calling it every time, or simply have FreeSpaceMapVacuum() terminate more quickly on some kind of 80/20 heuristic for this case.

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: ON CONFLICT DO UPDATE using EXCLUDED.column gives an error about mismatched types
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Using quicksort and a merge step to significantly improve on tuplesort's single run "external sort"