Re: FSM search modes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: FSM search modes
Дата
Msg-id 21044.1254416103@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: FSM search modes  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: FSM search modes  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> Yes, as Tom points out, this must be done with bias away from the very
> end of the table.

> I meant that we should start from the beginning of large spaces and that
> we shouldn't assume that all space worth filling is at start of
> relation.

Right.  One of the goals that FSM is trying to meet is ensuring that
different backends aren't trying to insert into the same page
concurrently, so as to reduce page-level contention.  So for example
it'd be a bad idea to adopt the really-dumb strategy of searching from
the start of the table for each request --- it'd funnel all the backends
to the same target page.  What we want is a behavior that is randomized
but tends to prefer pages towards the start rather than hitting all free
pages equally.  The btree precedent makes me suspect that quite a weak
preference would be sufficient.  So for example we might try resetting
the search to the start of the relation with probability 0.01.
        regards, tom lane


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

Предыдущее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: Limit allocated memory per session
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Rejecting weak passwords