pgsql: Improve LockAcquire API per my recent proposal.

Started by Tom Laneover 21 years ago1 messagescommitters
Jump to latest
#1Tom Lane
tgl@svr1.postgresql.org

Log Message:
-----------
Improve LockAcquire API per my recent proposal. All error conditions
are now reported via elog, eliminating the need to test the result code
at most call sites. Make it possible for the caller to distinguish a
freshly acquired lock from one already held in the current transaction.
Use that capability to avoid redundant AcceptInvalidationMessages() calls
in LockRelation().

Modified Files:
--------------
pgsql/contrib/userlock:
user_locks.c (r1.17 -> r1.18)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/userlock/user_locks.c.diff?r1=1.17&r2=1.18)
pgsql/src/backend/storage/lmgr:
lmgr.c (r1.74 -> r1.75)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lmgr.c.diff?r1=1.74&r2=1.75)
lock.c (r1.153 -> r1.154)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lock.c.diff?r1=1.153&r2=1.154)
pgsql/src/include/storage:
lock.h (r1.86 -> r1.87)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/lock.h.diff?r1=1.86&r2=1.87)