INNER CODE UNIT · C
lockmode
timescale/pg_textsearch · src/mod.c:3014
LOCKMODE lockmode = state->nowait ? NoLock : AccessShareLock;
if (state->nowait &&
!ConditionalLockRelationOid(indexoid, AccessShareLock))
tp_report_nowait_relation_lock_error(indexoid);
index_rel = try_relation_open(indexoid, lockmode);
if (index_rel == NULL)
{
if (state->nowait)
UnlockRelationOid(indexoid, AccessShareLock);
return false;
}
if (!tp_is_physical_bm25_index_relation(index_rel))
{
relation_close(index_rel, lockmode);
if (state->nowait)
UnlockRelationOid(indexoid, AccessShareLock);
return false;