Skip site navigation (1) Skip section navigation (2)

Re: FlexLocks

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: FlexLocks
Date: 2011-11-16 20:17:06
Message-ID: CA+Tgmoax_14rbx8Y6mmgvW64gCQL4ZviDzwEObXEMuiV=TwmxQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, Nov 16, 2011 at 12:25 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
>> We could alternatively change one or the other of them to be a
>> struct with one member, but I think the cure might be worse than
>> the disease.  By my count, we are talking about saving perhaps as
>> many as 34 lines of code changes here, and that's only if
>> complicating the type handling doesn't require any changes to
>> places that are untouched at present, which I suspect it would.
>
> So I stepped through all the changes of this type, and I notice that
> most of them are in areas where we've talked about likely benefits
> of creating new FlexLock variants instead of staying with LWLocks;
> if any of that is done (as seems likely), it further reduces the
> impact from 34 lines.  If we take care of LWLockHeldByMe() as you
> describe, I'll concede the FlexLockId changes.

Updated patches attached.

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

Attachment: procarraylock-v1.patch
Description: application/octet-stream (33.5 KB)
Attachment: flexlock-v2.patch
Description: application/octet-stream (70.3 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-11-16 20:42:07
Subject: Re: Minor optimisation of XLogInsert()
Previous:From: Kevin GrittnerDate: 2011-11-16 20:06:11
Subject: Re: Patch to allow users to kill their own queries

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group