I wrote:
> jian he <jian(dot)universality(at)gmail(dot)com> writes:
>> we can change to
>> if (relid != tab->relid)
>> LockRelationOid(relid, AccessExclusiveLock);
>> obviously, the comments need to be updated.
> Yeah, I came to the same conclusion after studying it for awhile.
Here's a patch for that. Working on back-patching it ...
regards, tom lane