pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Віталій Тимчишин <tivv00@gmail.com>
Cc: Ivan Voras <ivoras@freebsd.org>
Cc: Jignesh Shah <jkshah@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance under contention
Date: Wed, 8 Dec 2010 20:41:44 -0500
Message-ID: <AANLkTimLySOatnsAOJtW-pdfEWGF7A-J3QDORSPTANU6@mail.gmail.com> (raw)
In-Reply-To: <21911.1291845739@sss.pgh.pa.us>
References: <icccng$kpg$1@dough.gmane.org>
	<AANLkTinFqxaUnpq9E+oh6KcoyqPHDMxjS-_g3AJSPxmk@mail.gmail.com>
	<AANLkTin7iSm3abU8cjWJYJZ4fDuz4Sg69rv17Xh5Z3J1@mail.gmail.com>
	<AANLkTimRPXTs0DXNLQT1nubeNT+tH2JHVXg1-KidvBcH@mail.gmail.com>
	<AANLkTim1EphkUMV=PWV0mF8HaGHqH2H+whnFtqPOnTN_@mail.gmail.com>
	<AANLkTi=q6EFaTuWU9gVFC3g8+6FucFguwBxcyauwEdjh@mail.gmail.com>
	<AANLkTinffMekisiwq9Dip9uWxG2_qeMgPkctw=nCkZmv@mail.gmail.com>
	<AANLkTim2nr+pKJ6ZwduEthzdV94=Ovh9ys_E6nEZCWbr@mail.gmail.com>
	<AANLkTin=vVgkpYe2u_WBVHV59dgbe5QZ6PZ-nsT28Yb5@mail.gmail.com>
	<14229.1291818863@sss.pgh.pa.us>
	<AANLkTimzGPikGwz-G_bGn8kzFK2RyUxf9cDFQk7E8Zk1@mail.gmail.com>
	<21911.1291845739@sss.pgh.pa.us>

2010/12/8 Tom Lane <tgl@sss.pgh.pa.us>:
> Robert Haas <robertmhaas@gmail.com> writes:
>> 2010/12/8 Tom Lane <tgl@sss.pgh.pa.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.

Sure, but it doesn't use the hash table to do it.  All the PROCLOCKs
for any given LOCK are in a linked list; we just walk it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



view thread (34+ messages)

Message-ID: <AANLkTimLySOatnsAOJtW-pdfEWGF7A-J3QDORSPTANU6@mail.gmail.com>
Permalink:  ../AANLkTimLySOatnsAOJtW-pdfEWGF7A-J3QDORSPTANU6@mail.gmail.com/
Also on:    postgresql.org/message-id/AANLkTimLySOatnsAOJtW-pdfEWGF7A-J3QDORSPTANU6@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: robertmhaas@gmail.com, tgl@sss.pgh.pa.us, tivv00@gmail.com, ivoras@freebsd.org, jkshah@gmail.com
  Subject: Re: Performance under contention
  In-Reply-To: <AANLkTimLySOatnsAOJtW-pdfEWGF7A-J3QDORSPTANU6@mail.gmail.com>
  References: <icccng$kpg$1@dough.gmane.org> <AANLkTinFqxaUnpq9E+oh6KcoyqPHDMxjS-_g3AJSPxmk@mail.gmail.com> <AANLkTin7iSm3abU8cjWJYJZ4fDuz4Sg69rv17Xh5Z3J1@mail.gmail.com> <AANLkTimRPXTs0DXNLQT1nubeNT+tH2JHVXg1-KidvBcH@mail.gmail.com> <AANLkTim1EphkUMV=PWV0mF8HaGHqH2H+whnFtqPOnTN_@mail.gmail.com> <AANLkTi=q6EFaTuWU9gVFC3g8+6FucFguwBxcyauwEdjh@mail.gmail.com> <AANLkTinffMekisiwq9Dip9uWxG2_qeMgPkctw=nCkZmv@mail.gmail.com> <AANLkTim2nr+pKJ6ZwduEthzdV94=Ovh9ys_E6nEZCWbr@mail.gmail.com> <AANLkTin=vVgkpYe2u_WBVHV59dgbe5QZ6PZ-nsT28Yb5@mail.gmail.com> <14229.1291818863@sss.pgh.pa.us> <AANLkTimzGPikGwz-G_bGn8kzFK2RyUxf9cDFQk7E8Zk1@mail.gmail.com> <21911.1291845739@sss.pgh.pa.us> <AANLkTimLySOatnsAOJtW-pdfEWGF7A-J3QDORSPTANU6@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox