Re: Reduce ProcArrayLock contention - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Reduce ProcArrayLock contention
Date
Msg-id CAA4eK1L4oG9WF1nJ8FgLK+akRewUR5K=atnS1D_PM6ZvL3g9yQ@mail.gmail.com
Whole thread Raw
In response to Re: Reduce ProcArrayLock contention  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Reduce ProcArrayLock contention  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Tue, Aug 4, 2015 at 8:59 PM, Robert Haas <robertmhaas@gmail.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.



With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCH] libpq: Allow specifying multiple host names to try to connect to
Next
From: Tom Lane
Date:
Subject: Re: Raising our compiler requirements for 9.6