mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
Add missing FreeDir() in CheckTablespaceDirectory()
CheckTablespaceDirectory() did not close the directory opened with AllocateDir(), leaving its resources held during subsequent recovery, potentially indefinitely on a standby. Add the missing FreeDir() call. Backpatch to all supported versions. Author: Chao Li <lic@highgo.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/66A784B7-55C1-4613-8C24-B4C2A8D75414@gmail.com Backpatch-through: 14
This commit is contained in:
@@ -8333,6 +8333,7 @@ CheckTablespaceDirectory(void)
|
||||
errdetail("All directory entries in pg_tblspc/ should be symbolic links."),
|
||||
errhint("Remove those directories, or set allow_in_place_tablespaces to ON transiently to let recovery complete.")));
|
||||
}
|
||||
FreeDir(dir);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user