pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: Greg Smith <greg@2ndquadrant.com>
Cc: Jignesh Shah <jkshah@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Rob Wultsch <wultsch@gmail.com>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Group commit and commit delay/siblings
Date: Wed, 08 Dec 2010 19:00:52 +0000
Message-ID: <1291834852.2872.1168.camel@ebony> (raw)
In-Reply-To: <4CFDBDA2.4050705@2ndquadrant.com>
References: <AANLkTik3dr076BMQ6MqCLZZ0x2-qxmQgWoqCR7c0ePoD@mail.gmail.com>
	<AANLkTi=fUBnfR7K5uAQZkvaymuVHzUuCpeu4NOtLOMOU@mail.gmail.com>
	<4CFC6814.9010002@2ndquadrant.com>
	<28624.1291658109@sss.pgh.pa.us>
	<AANLkTim7DE99=R6FH=5bD3yTC9t_xjVUvf+e3knbfoyK@mail.gmail.com>
	<4CFDBDA2.4050705@2ndquadrant.com>

On Mon, 2010-12-06 at 23:52 -0500, Greg Smith wrote:
> Jignesh Shah wrote:
> > On Tue, Dec 7, 2010 at 1:55 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >   
> >> I could have sworn we'd refactored that to something like
> >>        bool ThereAreAtLeastNActiveBackends(int n)
> >> which could drop out of the loop as soon as it'd established what we
> >> really need to know...I'd suggest that we just improve the
> >> coding so that we don't scan ProcArray at all when commit_siblings is 0.
> >>
> >> (I do agree with improving the docs to warn people away from assuming
> >> this is a knob to frob mindlessly.)
> >>     
> > In that case I propose that we support commit_siblings=0 which is not
> > currently supported. Minimal value for commit_siblings  is currently
> > 1. If we support commit_siblings=0 then it should short-circuit that
> > function call which is often what I do in my tests with commit_delay.
> >   
> 
> Everybody should be happy now:  attached patch refactors the code to 
> exit as soon as the siblings count is exceeded, short-circuits with no 
> scanning of ProcArray if the minimum is 0, and allows setting the 
> siblings to 0 to enable that shortcut:

Minor patch, no downsides. Docs checked. Committed.

-- 
 Simon Riggs           http://www.2ndQuadrant.com/books/
 PostgreSQL Development, 24x7 Support, Training and Services
 




view thread (10+ messages)

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

 · 

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, greg@2ndquadrant.com, jkshah@gmail.com, tgl@sss.pgh.pa.us, wultsch@gmail.com
  Subject: Re: Group commit and commit delay/siblings
  In-Reply-To: <1291834852.2872.1168.camel@ebony>

* 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