pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: Matthew Wakeling <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Proposal of tunable fix for scalability of 8.4
Date: Wed, 18 Mar 2009 07:53:53 +0000
Message-ID: <1237362833.3953.186.camel@ebony.2ndQuadrant> (raw)
In-Reply-To: <alpine.DEB.2.00.0903161543590.21772@aragorn.flymine.org>
References: <alpine.GSO.2.01.0903121613270.1925@westnet.com>
	<C5DED7A7.33B2%scott@richrelevance.com>
	<603c8f070903121829r31cf1472ha9876e5c480a542e@mail.gmail.com>
	<12292.1236964604@sss.pgh.pa.us>
	<49BB699D.1070809@enterprisedb.com>
	<alpine.DEB.2.00.0903161543590.21772@aragorn.flymine.org>


On Mon, 2009-03-16 at 16:26 +0000, Matthew Wakeling wrote:
> One possibility would be for the locks to alternate between exclusive
> and 
> shared - that is:
> 
> 1. Take a snapshot of all shared waits, and grant them all -
> thundering
>      herd style.
> 2. Wait until ALL of them have finished, granting no more.
> 3. Take a snapshot of all exclusive waits, and grant them all, one by
> one.
> 4. Wait until all of them have been finished, granting no more.
> 5. Back to (1)

I agree with that, apart from the "granting no more" bit.

Currently we queue up exclusive locks, but there is no need to since for
ProcArrayLock commits are all changing different data.

The most useful behaviour is just to have two modes:
* exclusive-lock held - all other x locks welcome, s locks queue
* shared-lock held - all other s locks welcome, x locks queue

This *only* works for ProcArrayLock.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support




view thread (119+ messages)  latest in thread

Message-ID: <1237362833.3953.186.camel@ebony.2ndQuadrant>
Permalink:  ../1237362833.3953.186.camel@ebony.2ndQuadrant/
Also on:    postgresql.org/message-id/1237362833.3953.186.camel@ebony.2ndQuadrant

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: simon@2ndQuadrant.com, matthew@flymine.org
  Subject: Re: Proposal of tunable fix for scalability of 8.4
  In-Reply-To: <1237362833.3953.186.camel@ebony.2ndQuadrant>

* 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