pgsql: Add a function GetLockConflicts() to lock.c to report xacts - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Add a function GetLockConflicts() to lock.c to report xacts
Date
Msg-id 20060827191434.9C1069FC6BE@postgresql.org
Whole thread Raw
List 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)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Move xact.c's partial support for Lists of TransactionIds into
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Add some notes about why it's not a bug that RI_FKey_check calls