Re: Performance under contention

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Віталій Тимчишин <tivv00(at)gmail(dot)com>, Ivan Voras <ivoras(at)freebsd(dot)org>, Jignesh Shah <jkshah(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance under contention
Date: 2010-12-08 22:02:19
Message-ID: 21911.1291845739@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> 2010/12/8 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> Now, it's possible that you could avoid *ever* needing to search for a
>> specific PROCLOCK, in which case eliminating the hash calculation
>> overhead might be worth it.

> That seems like it might be feasible. The backend that holds the lock
> ought to be able to find out whether there's a PROCLOCK by looking at
> the LOCALLOCK table, and the LOCALLOCK has a pointer to the PROCLOCK.

Hm, that is a real good point. Those shared memory data structures
predate the invention of the local lock tables, and I don't think we
looked real hard at whether we should rethink the fundamental
representation in shared memory given the additional local state.
The issue though is whether any other processes ever need to look
at a proc's PROCLOCKs. I think at least deadlock detection does.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Benjamin Krajmalnik 2010-12-08 23:03:43 Hardware recommendations
Previous Message Robert Haas 2010-12-08 21:09:17 Re: Performance under contention