Re: Reducing ClogControlLock contention - Mailing list pgsql-hackers

From Jesper Pedersen
Subject Re: Reducing ClogControlLock contention
Date
Msg-id 55FC518F.4070002@redhat.com
Whole thread Raw
In response to Re: Reducing ClogControlLock contention  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Reducing ClogControlLock contention  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On 08/31/2015 07:34 AM, Amit Kapila wrote:
> I have updated the patch (attached with mail) to show
> you what I have in mind.
>

I havn't been able to get a successful run with _v5 using pgbench.

TransactionIdSetStatusBit assumes an exclusive lock on CLogControlLock 
when called, but that part is removed from TransactionIdSetPageStatus now.

I tried an
  if (!LWLockHeldByMe(CLogControlLock))  {      LWLockAcquire(CLogControlLock, LW_EXCLUSIVE);      mode = LW_EXCLUSIVE;
}
 

approach, but didn't get further. Plus that probably isn't the best way, 
since we will traverse all LWLock's, and we need to account for cases w/ 
and w/o sub-transactions, e.g. multiple calls to 
TransactionIdSetStatusBit within the CLogControlLock exclusive boundary.

Best regards, Jesper




pgsql-hackers by date:

Previous
From: Jesper Pedersen
Date:
Subject: Re: Speed up Clog Access by increasing CLOG buffers
Next
From: Fabien COELHO
Date:
Subject: Re: extend pgbench expressions with functions