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-06 16:06:11
Message-ID: CA+Tgmobb-Sun66h=Z9Cj16nj6n-U8=Bj8xpfQSxk9FJsGX3NXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 5, 2015 at 10:59 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Tue, Aug 4, 2015 at 8:59 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>
>> I'm not entirely happy with the name "nextClearXidElem" but apart from
>> that I'm fairly happy with this version. We should probably test it
>> to make sure I haven't broken anything;
>
>
> I have verified the patch and it is fine. I have tested it via manual
> tests; for long pgbench tests, results are quite similar to previous
> versions of patch.
>
> Few changes, I have made in patch:
>
> 1.
>
> +static void
>
> +ProcArrayGroupClearXid(PGPROC *proc, TransactionId latestXid)
>
> +{
>
> + volatile PROC_HDR *procglobal = ProcGlobal;
>
> + uint32 nextidx;
>
> + uint32 wakeidx;
>
> + int extraWaits = -1;
>
> +
>
> + /* We should definitely have an XID to clear. */
>
> + Assert(TransactionIdIsValid(pgxact->xid));
>
>
>
> Here Assert is using pgxact which is wrong.
>
> 2. Made ProcArrayEndTransactionInternal as inline function as
> suggested by you.

OK, committed.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2015-08-06 17:23:18 Re: Removing unreferenced files
Previous Message Alvaro Herrera 2015-08-06 15:43:06 Re: Raising our compiler requirements for 9.6