Skip site navigation (1) Skip section navigation (2)

Wrong advisory locks docs in pg_locks

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: Wrong advisory locks docs in pg_locks
Date: 2011-11-25 13:54:27
Message-ID: CA+mi_8Z67=OTJrNMxzKvtsTRcKXmrN50GUjtnLvkZ3=d2-ky1g@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-docs
Hello,

documentation about advisory locks in the pg_locks view
<http://developer.postgresql.org/pgdocs/postgres/view-pg-locks.html>
is incorrect/incomplete: the space specifier field is objsubid, not
objid, and there is no information about how the key is stored.

    => select pg_advisory_lock(1111, 2222);
    => select pg_advisory_lock((3333 * 2^32 + 4444)::bigint);
    => select classid, objid, objsubid from pg_locks where locktype='advisory';
     classid | objid | objsubid
    ---------+-------+----------
        3333 |  4444 |        1
        1111 |  2222 |        2

I've only checked the classid/objid/objsubid fields, don't know about
the other ones.

Proposed patch attached.

-- Daniele

Attachment: advisory-locks-doc.patch
Description: text/x-patch (1.5 KB)

Responses

pgsql-docs by date

Next:From: Alex SherwinDate: 2011-11-25 14:43:27
Subject: Documentation example for RECURISVE WITH isn't what I would expect
Previous:From: Alvaro HerreraDate: 2011-11-24 21:07:36
Subject: Re: PG documentation build is wedged

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group