Commit 2484329
committed
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.pgsql1 parent 5c6d184 commit 2484329
1 file changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3041 | 3041 | | |
3042 | 3042 | | |
3043 | 3043 | | |
3044 | | - | |
3045 | | - | |
| 3044 | + | |
3046 | 3045 | | |
3047 | | - | |
3048 | | - | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
3049 | 3049 | | |
3050 | 3050 | | |
3051 | 3051 | | |
| |||
3094 | 3094 | | |
3095 | 3095 | | |
3096 | 3096 | | |
3097 | | - | |
| 3097 | + | |
3098 | 3098 | | |
3099 | 3099 | | |
3100 | | - | |
3101 | | - | |
| 3100 | + | |
3102 | 3101 | | |
3103 | 3102 | | |
3104 | 3103 | | |
| |||
0 commit comments