Re: pg_locks documentation vs. SSI

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_locks documentation vs. SSI
Date: 2011-06-24 20:10:42
Message-ID: BANLkTinUB3WyVx=VtSHXL=L+QJsP8+BvEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 24, 2011 at 1:08 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
>> What I think we should do is replace the existing paragraph with
>> something along these lines:
>>
>> The <structname>pg_locks<structname> view displays data from both
>> the regular lock manager and the predicate lock manager, which are
>> separate systems.  When this view is accessed, the internal data
>> structures of each lock manager are momentarily locked, and copies
>> are made for the view to display.  Each lock manager will
>> therefore produce a consistent set of results, but as we do not
>> lock both lock managers simultaneously, it is possible for locks
>> to be taken or released after we interrogate the regular lock
>> manager and before we interrogate the predicate lock manager.
>> Each lock manager is only locked for the minimum possible time so
>> as to reduce the performance impact of querying this view, but
>> there could nevertheless be some impact on database performance if
>> it is frequently accessed.
>
> I agree that it's probably better to document it than to increase
> the time that both systems are locked.  If we get complaints about
> it, we can always revisit the issue in a later release.
>
> The above wording looks fine to me.

OK, committed that change.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-06-24 20:27:22 Re: ALTER TABLE lock strength reduction patch is unsafe
Previous Message Robert Haas 2011-06-24 20:00:27 Re: ALTER TABLE lock strength reduction patch is unsafe