Re: [GENERAL] advisory locks: documentation hint and feature request

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Marc Mamin <M(dot)Mamin(at)intershop(dot)de>
Cc: PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org>
Subject: Re: [GENERAL] advisory locks: documentation hint and feature request
Date: 2008-03-06 18:50:36
Message-ID: 200803061850.m26Ioaw26516@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-general

Marc Mamin wrote:
> doing this, I missed an information in the documentation that would be
> useful to add:
>
>
> pg_locks columns definition
> ---------------------------
>
> current definition:
>
> objid : OID of the object within its system catalog,
> or NULL if the object is not a general database object
>
> to add: "For advisory locks it is used to distinguish the two key
> spaces (one int8 or two int4 keys)
>
>
> Table 9-56. Advisory Lock Functions (8.3 Beta)
> -----------------------------------
> current: (note that these two key spaces do not overlap)
>
> to add: "; The two key spaces are separated on the column objid in the
> pg_locks view"
>

I have added your suggested changes to the docs with the attached patch.
Thanks.

> Moreover I missed some function that would allow a cleaner
> implementation of my features
> (reducing the need to query the pg_locks view)
>
> For example:
>
> --current shared lock count (owned / all)
> pg_advisory_lock_shared_count_my(key bigint)
> pg_advisory_lock_shared_count_all(key bigint)
>
>
> --enforce exclusive locks so that they cannot be stacked
> pg_try_advisory_lock_single(key bigint)

Sorry, I am afraid they would not have general-enough usefulness.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/rtmp/diff text/x-diff 2.3 KB

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2008-03-07 01:46:58 Re: [DOCS] Incrementally Updated Backups: Docs Clarification
Previous Message Bruce Momjian 2008-03-06 16:32:03 Re: [HACKERS] bgwriter_lru_multiplier blurbs inconsistent

Browse pgsql-general by date

  From Date Subject
Next Message js 2008-03-06 19:40:59 Re: Violation of non existing reference
Previous Message newbiegalore 2008-03-06 18:49:37 staring pgsql on fedora 8