Re: Reducing ClogControlLock contention

From: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reducing ClogControlLock contention
Date: 2015-09-18 18:01:51
Message-ID: 55FC518F.4070002@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2015-09-18 18:35:48 Re: extend pgbench expressions with functions
Previous Message Jesper Pedersen 2015-09-18 17:38:59 Re: Speed up Clog Access by increasing CLOG buffers