Re: Reduce ProcArrayLock contention - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Reduce ProcArrayLock contention
Date
Msg-id CA+TgmobP=+WXJzEQq6+VR=w-WY=G4EDKXQvDYA3LDZm=wih3mw@mail.gmail.com
Whole thread Raw
In response to Re: Reduce ProcArrayLock contention  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Tue, Aug 4, 2015 at 11:29 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> 4. I factored out the actual XID-clearing logic into a new function
> ProcArrayEndTransactionInternal instead of repeating it twice. On the
> flip side, I merged PushProcAndWaitForXidClear with
> PopProcsAndClearXids and renamed the result to ProcArrayGroupClearXid,
> since there seemed to be no need to separate them.

Thinking about this a bit more, it's probably worth sticking an
"inline" designation on ProcArrayEndTransactionInternal.  Keeping the
time for which we hold ProcArrayLock in exclusive mode down to the
absolute minimum possible number of instructions seems like a good
plan.

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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: tablecmds.c and lock hierarchy
Next
From: Piotr Stefaniak
Date:
Subject: Re: [sqlsmith] Failed assertion in joinrels.c