why local_preload_libraries does require a separate directory ?
От | Tomas Vondra |
---|---|
Тема | why local_preload_libraries does require a separate directory ? |
Дата | |
Msg-id | 4EDA38AE.5030003@fuzzy.cz обсуждение исходный текст |
Ответы |
Re: why local_preload_libraries does require a separate directory ?
|
Список | pgsql-hackers |
Hi, why the libraries loaded using local_preload_libraries need to be placed in a different subdirectory than libraries loaded using shared_preload_libraries? And why it does not use dynamic_library_path but a hardcoded path '$libdir/plugins'? I do understand that leaving the users to load whatever libraries they want is a bad idea, but when the library is loaded from postgresql.conf it should be safe. Therefore I'd expect / propose this behaviour: 1) libs loaded from shared_preload_libraries/local_preload_libraries - any paths are allowed (relative and absolute) - relative paths are resolved using dynamic_library_path if specified,$libdir otherwise - absolute paths are allowed, may load libraries from other locations 2) libs loaded using LOAD - check that the library is loaded from dynamic_library_path (if specified), $libdir otherwise AFAIK this prevents '..' type attacks and makes it easier to install extensions (shared libs are installed to $libdir, so if you need to load a library using local_preload_libraries, you have to copy it manually). Tomas
В списке pgsql-hackers по дате отправления: