Re: Reduce ProcArrayLock contention

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Reduce ProcArrayLock contention
Дата
Msg-id CAA4eK1KWm-QkgeAdOZq6dq+6T06G+qkEETKqkX9bXw3QdRSUHg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Reduce ProcArrayLock contention  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Reduce ProcArrayLock contention  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Mon, Jul 27, 2015 at 8:47 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Sat, Jul 25, 2015 at 12:42 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> > I thought that internal API will automatically take care of it,
> > example for msvc it uses _InterlockedCompareExchange64
> > which if doesn't work on 32-bit systems or is not defined, then
> > we have to use 32-bit version, but I am not certain about
> > that fact.
>
> Instead of using pg_atomic_uint64, how about using pg_atomic_uint32
> and storing the pgprocno rather than the pointer directly?  
>

Good Suggestion!

I think this can work the way you are suggesting and I am working on
same.  Here I have one question,  do you prefer to see the code for
this optimisation be done via some LWLock interface as Pavan is
suggesting?  I am not very sure if LWLock is a good interface for this
work, but surely I can encapsulate it into different functions rather than
doing everything in ProcArrayEndTransaction.


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: security labels on databases are bad for dump & restore
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: upgrade failure from 9.5 to head