Re: spinlock contention

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: spinlock contention
Дата
Msg-id BANLkTinq-yuHQwu2kTG_2fguOf2A-UJ32Q@mail.gmail.com
обсуждение исходный текст
Ответ на spinlock contention  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: spinlock contention  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Thu, Jun 23, 2011 at 4:42 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> ProcArrayLock looks like a tougher nut to crack - there's simply no
> way, with the system we have right now, that you can take a snapshot
> without locking the list of running processes.  I'm not sure what to
> do about that, but we're probably going to have to come up with
> something, because it seems clear that once we eliminate the lock
> manager LWLock contention, this is a major bottleneck.

Well as Tom observed earlier the kernel of a snapshot is actually a
LSN. A snapshot contains a set of xids which all committed before some
LSN and none which committed after it.

So if we had a record of what log sequence number the commit record
for any given transaction is we could build the snapshot at our
leisure without any exclusive lock. In fact we could even build it
lazily as a kind of cache only when we actually are interested in a
given xid.





--
greg


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Range Types, constructors, and the type system
Следующее
От: Greg Stark
Дата:
Сообщение: Word-smithing doc changes