Re: Reduce ProcArrayLock contention

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reduce ProcArrayLock contention
Date: 2015-08-04 17:24:06
Message-ID: CA+TgmobP=+WXJzEQq6+VR=w-WY=G4EDKXQvDYA3LDZm=wih3mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 4, 2015 at 11:29 AM, Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Piotr Stefaniak 2015-08-04 17:31:30 Re: [sqlsmith] Failed assertion in joinrels.c
Previous Message Alvaro Herrera 2015-08-04 17:23:20 Re: tablecmds.c and lock hierarchy