Commit 843d90d
committed
Fix session lock leak in ALTER DATABASE SET TABLESPACE for utility mode
movedb() acquires a session-level AccessExclusiveLock on the database
via MoveDbSessionLockAcquire(). The release in CommitTransaction()
only checked for GP_ROLE_DISPATCH and IS_SINGLENODE(), missing
GP_ROLE_UTILITY. This caused the lock to leak in standalone backends
(e.g. TAP tests), triggering a proc.c assertion failure at exit:
FailedAssertion("SHMQueueEmpty(&(MyProc->myProcLocks[i]))")
Add GP_ROLE_UTILITY to the release condition.
Also fix a spurious "could not read symbolic link" log message when
dropping in-place tablespaces: readlink() on a directory returns
EINVAL, which is expected and can be safely skipped.
Fixes #16261 parent e91712d commit 843d90d
2 files changed
+19
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3036 | 3036 | | |
3037 | 3037 | | |
3038 | 3038 | | |
3039 | | - | |
3040 | | - | |
3041 | | - | |
3042 | | - | |
3043 | | - | |
3044 | | - | |
3045 | | - | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
3046 | 3048 | | |
3047 | 3049 | | |
3048 | 3050 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1230 | 1230 | | |
1231 | 1231 | | |
1232 | 1232 | | |
1233 | | - | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
1234 | 1238 | | |
1235 | 1239 | | |
1236 | 1240 | | |
1237 | | - | |
1238 | | - | |
1239 | | - | |
1240 | | - | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
1241 | 1246 | | |
1242 | 1247 | | |
1243 | 1248 | | |
| |||
0 commit comments