Content-Length: 2643 | pFad | http://github.com/postgrespro/testgres/pull/180.diff
thub.com diff --git a/testgres/node.py b/testgres/node.py index 6f466ec9..b85a62f2 100644 --- a/testgres/node.py +++ b/testgres/node.py @@ -6,6 +6,7 @@ import subprocess import threading import tempfile +import platform from queue import Queue import time @@ -1925,7 +1926,7 @@ def make_simple( # Define delayed propertyes if not ("unix_socket_directories" in options.keys()): - options["unix_socket_directories"] = __class__._gettempdir() + options["unix_socket_directories"] = __class__._gettempdir_for_socket() # Set config values node.set_auto_conf(options) @@ -1938,6 +1939,33 @@ def make_simple( return node + def _gettempdir_for_socket(): + platform_system_name = platform.system().lower() + + if platform_system_name == "windows": + return __class__._gettempdir() + + # + # [2025-02-17] Hot fix. + # + # Let's use hard coded path as Postgres likes. + # + # pg_config_manual.h: + # + # #ifndef WIN32 + # #define DEFAULT_PGSOCKET_DIR "/tmp" + # #else + # #define DEFAULT_PGSOCKET_DIR "" + # #endif + # + # On the altlinux-10 tempfile.gettempdir() may return + # the path to "private" temp directiry - "/temp/.private/Fetched URL: http://github.com/postgrespro/testgres/pull/180.diff
Alternative Proxies: