Adjust comments of CheckRelationTableSpaceMove() and SetRelationTableSpace()
authorMichael Paquier <michael@paquier.xyz>
Fri, 29 Jan 2021 04:59:18 +0000 (13:59 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 29 Jan 2021 04:59:18 +0000 (13:59 +0900)
commit24843297a96d7be16cc3f4b090aacfc6e5e6839e
treec6c7c7f334131b39543f3eec75e7e17eb104f911
parent5c6d184213bb9feac0800eee1a16769bec9e8d58
Adjust comments of CheckRelationTableSpaceMove() and SetRelationTableSpace()

4c9c359, that introduced those two functions, has been overoptimistic on
the point that only ShareUpdateExclusiveLock would be required when
moving a relation to a new tablespace.  AccessExclusiveLock is a
requirement, but ShareUpdateExclusiveLock may be used under specific
conditions like REINDEX CONCURRENTLY where waits on past transactions
make the operation safe even with a lower-level lock.  The current code
does only the former, so update the existing comments to reflect that.

Once a REINDEX (TABLESPACE) is introduced, those comments would require
an extra refresh to mention their new use case.

While on it, fix an incorrect variable name.

Per discussion with Γlvaro Herrera.

Discussion: https://postgr.es/m/20210127140741.GA14174@alvherre.pgsql
src/backend/commands/tablecmds.c