]> granicus.if.org Git - postgresql/commit
Add a function GetLockConflicts() to lock.c to report xacts holding
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 27 Aug 2006 19:14:34 +0000 (19:14 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 27 Aug 2006 19:14:34 +0000 (19:14 +0000)
commite06fda0a8b6fa50ebd6183bfce4e8394dd8d7124
treee1b270da82cc9fc60229195a53f5e93302c6d8a2
parentca1fd0ea5b10e133a3ed00594fa908d5b647fa3d
Add a function GetLockConflicts() to lock.c to report xacts holding
locks that would conflict with a specified lock request, without
actually trying to get that lock.  Use this instead of the former ad hoc
method of doing the first wait step in CREATE INDEX CONCURRENTLY.
Fixes problem with undetected deadlock and in many cases will allow the
index creation to proceed sooner than it otherwise could've.  Per
discussion with Greg Stark.
src/backend/commands/indexcmds.c
src/backend/storage/lmgr/lock.c
src/include/storage/lock.h