Re: Reducing ClogControlLock contention

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reducing ClogControlLock contention
Date: 2015-07-01 10:19:40
Message-ID: CANP8+jJNXe=nooPPkPKfZMdTsD8Cq3CFc0YxQjtPzf+SU0VuTg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1 July 2015 at 11:14, Andres Freund <andres(at)anarazel(dot)de> wrote:

> On 2015-07-01 09:08:11 +0100, Simon Riggs wrote:
> > On 1 July 2015 at 09:00, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > > On Tue, Jun 30, 2015 at 12:32 PM, Simon Riggs <simon(at)2ndquadrant(dot)com>
> > > a. the semantics of new LWLock (CommitLock) introduced
> > > by patch seems to be different in the sense that it is just taken in
> > > Exclusive mode (and no Shared mode is required) as per your proposal.
> We
> > > could use existing LWLock APi's, but on the other hand we could even
> > > invent new LWLock API for this kind of locking.
> > >
> >
> > LWLock API code is already too complex, so -1 for more changes there
>
> I don't think that's a valid argument. It's better to have the
> complexity in one place (lwlock) than have rather similar complexity in
> several other places. The clog control lock is far from the only place
> that would benefit from tricks along these lines.
>

What "tricks" are being used??

Please explain why taking 2 locks is bad here, yet works fine elsewhere.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-07-01 10:21:11 Re: Reducing ClogControlLock contention
Previous Message Simon Riggs 2015-07-01 10:15:40 Re: Reducing ClogControlLock contention