Re: Deferring some AtStart* allocations?

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Deferring some AtStart* allocations?
Date: 2014-10-09 12:20:38
Message-ID: 20141009122038.GB6724@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-10-09 08:18:18 -0400, Robert Haas wrote:
> On Thu, Oct 9, 2014 at 5:34 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > Interesting - in my local profile AtStart_Inval() is more pronounced
> > than AfterTriggerBeginQuery(). I've quickly and in a ugly fashion hacked
> > AtStart_Inval() out of readonly queries ontop of your patch. Together
> > that yields a ~3.5% performance improvement in my trivial 'SELECT * FROM
> > tbl WHER pkey = xxx' testcase.
>
> Whoa. Now that's clearly significant.

Well, my guess it'll be far less noticeable in less trivial
workloads. But it does seem worthwile.

> You didn't attach the patch; was that inadvertent, or was it too ugly
> for that?

Far, far too ugly ;). I just removed the AtStart() call from xact.c and
sprinkled it around relevant places instead ;)

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-10-09 12:21:18 Re: Log notice that checkpoint is to be written on shutdown
Previous Message Robert Haas 2014-10-09 12:18:18 Re: Deferring some AtStart* allocations?