pgsql: Add a function GetLockConflicts() to lock.c to report xacts

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add a function GetLockConflicts() to lock.c to report xacts
Date: 2006-08-27 19:14:34
Message-ID: 20060827191434.9C1069FC6BE@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/backend/commands:
indexcmds.c (r1.147 -> r1.148)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/indexcmds.c.diff?r1=1.147&r2=1.148)
pgsql/src/backend/storage/lmgr:
lock.c (r1.171 -> r1.172)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lock.c.diff?r1=1.171&r2=1.172)
pgsql/src/include/storage:
lock.h (r1.97 -> r1.98)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/lock.h.diff?r1=1.97&r2=1.98)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2006-08-27 21:41:21 pgsql: Add some notes about why it's not a bug that RI_FKey_check calls
Previous Message Tom Lane 2006-08-27 19:11:46 pgsql: Move xact.c's partial support for Lists of TransactionIds into