Add transaction-level advisory locks.
Itagaki Takahiro <itagaki.takahiro@gmail.com>
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.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +111 −17 |
| doc/src/sgml/mvcc.sgml | modified | +22 −13 |
| src/backend/storage/lmgr/lock.c | modified | +69 −32 |
| src/backend/storage/lmgr/proc.c | modified | +3 −2 |
| src/backend/storage/lmgr/README | modified | +7 −4 |
| src/backend/utils/adt/lockfuncs.c | modified | +153 −1 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.h | modified | +16 −0 |
| src/include/storage/lock.h | modified | +1 −0 |
| src/include/utils/builtins.h | modified | +8 −0 |
| src/test/regress/expected/advisory_lock.out | added | +275 −0 |
| src/test/regress/parallel_schedule | modified | +1 −1 |
| src/test/regress/serial_schedule | modified | +1 −0 |
| src/test/regress/sql/advisory_lock.sql | added | +146 −0 |