Re: Safely calling index_getprocinfo() while holding an nbtree exclusive buffer lock - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Safely calling index_getprocinfo() while holding an nbtree exclusive buffer lock
Date
Msg-id 31431.1547521959@sss.pgh.pa.us
Whole thread Raw
In response to Safely calling index_getprocinfo() while holding an nbtree exclusivebuffer lock  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Safely calling index_getprocinfo() while holding an nbtreeexclusive buffer lock  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
Peter Geoghegan <pg@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


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Safely calling index_getprocinfo() while holding an nbtree exclusivebuffer lock
Next
From: Michael Paquier
Date:
Subject: Re: could recovery_target_timeline=latest be the default in standbymode?