Re: Separating Buffer LWlocks

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Separating Buffer LWlocks
Date: 2015-09-08 18:31:53
Message-ID: CA+TgmoYWnDJe7qiXozTnViW4sK8Yym0r4PBhBTrehMgTqZXxug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 8, 2015 at 2:19 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2015-09-08 14:15:32 -0400, Robert Haas wrote:
>> We could do that, but I'm not sure just calling LWLockNewTrancheId()
>> for all of the tranches would be so bad either.
>
> To me that seems either fragile or annoying to use. If all backends call
> LWLockNewTrancheId() we need to a be sure the callbacks are always going
> to be called in the same order.

How is that going to work? The counter is in shared memory.

> Otherwise everyone needs to store the
> tranche in shared memory (like xlog.c now does) which I find to be a
> rather annoying requirement.

Yes, everyone would need to do that. If that's too annoying to live
with, then we can adopt your suggestion.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-09-08 18:33:56 Re: Improving test coverage of extensions with pg_dump
Previous Message Robert Haas 2015-09-08 18:30:19 Re: Speed up Clog Access by increasing CLOG buffers