Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)
Date: 2012-03-07 15:28:38
Message-ID: 7608.1331134118@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> On Wed, Mar 7, 2012 at 3:04 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>>> So they are undoubtely rare. Not sure if as rare as Higgs bosons.

>> Even if they're rare, having a major performance hiccup when one happens
>> is not a side-effect I want to see from a patch whose only reason to
>> exist is better performance.

> I agree the effect you point out can exist, I just don't want to slow
> down the main case as a result.

I don't see any reason to think that what I suggested would slow things
down, especially not if the code were set up to fall through quickly in
the typical case where no page boundary is crossed. Integer division is
not slow on any machine made in the last 15 years or so.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-03-07 15:39:40 Re: pg_stat_statements and planning time
Previous Message Simon Riggs 2012-03-07 15:26:43 Re: RFC: Making TRUNCATE more "MVCC-safe"