From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(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-05 14:59:59 |
Message-ID: | CAA4eK1L4oG9WF1nJ8FgLK+akRewUR5K=atnS1D_PM6ZvL3g9yQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
group-xid-clearing-v5.patch | application/octet-stream | 9.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-08-05 15:12:34 | Re: Raising our compiler requirements for 9.6 |
Previous Message | Bruce Momjian | 2015-08-05 14:53:10 | Re: [PATCH] libpq: Allow specifying multiple host names to try to connect to |