Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> writes:
> find_all_inheritors() with NoLock doesn't lock anything below the
> given relation, but it still calls find_inheritance_children() on
> every relation it found, which starts with has_subclass(), and that
> errors out if the pg_class row is gone:
I think the assumption is that NoLock should only be used if the
caller already got a lock on the whole inheritance tree. So
I would blame the callers that are not doing that, rather than
squishy-fying find_all_inheritors' semantics. This seems quite
horrid:
> The attached patch makes find_inheritance_children_extended() return
> an empty list if the relation is gone, instead of erroring out.
regards, tom lane