pgsql: Add transaction-level advisory locks.

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add transaction-level advisory locks.
Date: 2011-02-18 05:14:54
Message-ID: E1PqIgA-00075D-2l@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-committers

Add transaction-level advisory locks.

They share the same locking namespace with the existing session-level
advisory locks, but they are automatically released at the end of the
current transaction and cannot be released explicitly via unlock
functions.

Marko Tiikkaja, reviewed by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/62c7bd31c8878dd45c9b9b2429ab7a12103f3590

Modified Files
--------------
doc/src/sgml/func.sgml | 128 +++++++++++--
doc/src/sgml/mvcc.sgml | 35 ++--
src/backend/storage/lmgr/README | 11 +-
src/backend/storage/lmgr/lock.c | 101 +++++++---
src/backend/storage/lmgr/proc.c | 5 +-
src/backend/utils/adt/lockfuncs.c | 154 +++++++++++++++-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 16 ++
src/include/storage/lock.h | 1 +
src/include/utils/builtins.h | 8 +
src/test/regress/expected/advisory_lock.out | 275 +++++++++++++++++++++++++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/serial_schedule | 1 +
src/test/regress/sql/advisory_lock.sql | 146 ++++++++++++++
14 files changed, 814 insertions(+), 71 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Itagaki Takahiro 2011-02-18 05:34:25 pgsql: Fix an uninitialized field in DR_copy.
Previous Message Tom Lane 2011-02-18 03:34:33 Re: pgsql: Use $INDENT rather than indent throughout the pgindent code