Peter Geoghegan <p...@bowt.ie> writes: > My nbtree patch [1] needs to call index_getprocinfo() with an > exclusive buffer lock held during a leaf page split.
I think you should stop right there and ask why. Surely that info can be obtained before starting the operation? Quite aside from the deadlock hazard, I do not think holding an exclusive buffer lock for long enough to go consult a system catalog will be acceptable from a performance/concurrency standpoint. regards, tom lane