Re: Deferring some AtStart* allocations? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Deferring some AtStart* allocations?
Date
Msg-id CA+TgmoZDxbbSfvBKA53SSMUB1g-mMYOCHHa90cJnCNdTK4zpgQ@mail.gmail.com
Whole thread Raw
In response to Re: Deferring some AtStart* allocations?  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Deferring some AtStart* allocations?
Re: Deferring some AtStart* allocations?
Re: Deferring some AtStart* allocations?
List pgsql-hackers
On Thu, Oct 9, 2014 at 8:20 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> On 2014-10-09 08:18:18 -0400, Robert Haas wrote:
>> On Thu, Oct 9, 2014 at 5:34 AM, Andres Freund <andres@2ndquadrant.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 ;)

OK, here's an attempt at a real patch for that.  I haven't perf-tested this.

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

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Last Commitfest patches waiting review
Next
From: Heikki Linnakangas
Date:
Subject: Re: Last Commitfest patches waiting review