Re: Storing hot members of PGPROC out of the band

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Storing hot members of PGPROC out of the band
Дата
Msg-id CA+U5nMLJ-=nmrPnZEOb=HnsSmQg0VuQYzG+XDwYn3CmtX+drRA@mail.gmail.com
обсуждение исходный текст
Ответ на Storing hot members of PGPROC out of the band  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Ответы Re: Storing hot members of PGPROC out of the band  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Re: Storing hot members of PGPROC out of the band  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
On Thu, Nov 3, 2011 at 6:12 PM, Pavan Deolasee <pavan.deolasee@gmail.com> wrote:

> When PGPROC array is allocated, we also allocate another array of
> PGPROC_MINIMAL structures of the same size. While accessing the
> ProcArray, a simple pointer mathematic can get us the corresponding
> PGPROC_MINIMAL structure. The only exception being the dummy PGPROC
> for prepared transaction. A first cut version of the patch is
> attached. It looks big, but most of the changes are cosmetic because
> of added indirection. The patch also contains another change to keep
> the ProcArray sorted by (PGPROC *) to preserve locality of references
> while traversing the array.

This is very good.

If you look at your PGPROC_MINIMAL, its mostly transaction related
stuff, so I would rename it PGXACT or similar. Not sure why you talk
about pointer math, seems easy enough just to have two arrays
protected by one lock, and have each proc use the same offset in both
arrays.

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


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: isolationtester patch
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Online base backup from the hot-standby