Tom Lane wrote:
>
> My guess is that we ought to be checking for relcache invalidation
> immediately after gaining any lock on the relation. I don't know where
> that should be done, however.
Seems as GOOD solution!
We could do inval check in LockRelation() just after LockAcquire().
Vadim