Thread: [Patch] - Bug #7580 - uwsgi + nginx db backup does not work
Hello,
Please find the attached path which fixes the error while taking backup using pgadmin configured using uWSGI & NGINX.
Actually error is -
2022-09-01 15:17:29,897: ERROR pgadmin: preexec_fn not supported within subinterpreters Traceback (most recent call last): File "/opt/pgadmin/venv/lib/python3.8/site-packages/pgadmin4/pgadmin/tools/backup/__init__.py", line 451, in create_backup_objects_job p.start() File "/opt/pgadmin/venv/lib/python3.8/site-packages/pgadmin4/pgadmin/misc/bgprocess/processes.py", line 336, in start p = self.get_process_output(cmd, env) File "/opt/pgadmin/venv/lib/python3.8/site-packages/pgadmin4/pgadmin/misc/bgprocess/processes.py", line 374, in get_process_output p = Popen( File "/usr/lib/python3.8/subprocess.py", line 858, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.8/subprocess.py", line 1639, in _execute_child self.pid = _posixsubprocess.fork_exec( RuntimeError: preexec_fn not supported within subinterpreters
Which is causing due to change in version 3.8 - 'The preexec_fn parameter is no longer supported in subinterpreters.'. (Refer this link)
I have tested the attached patch with dev env on Mac & centos platform. Also tested with installed pgadmin version with pip by manipulating corresponding files.
Thanks,
Yogesh Mahajan
EnterpriseDB
Attachment
Thanks, the patch was applied.
On Fri, Sep 2, 2022 at 12:51 PM Yogesh Mahajan <yogesh.mahajan@enterprisedb.com> wrote:
Hello,Please find the attached path which fixes the error while taking backup using pgadmin configured using uWSGI & NGINX.Actually error is -2022-09-01 15:17:29,897: ERROR pgadmin: preexec_fn not supported within subinterpreters Traceback (most recent call last): File "/opt/pgadmin/venv/lib/python3.8/site-packages/pgadmin4/pgadmin/tools/backup/__init__.py", line 451, in create_backup_objects_job p.start() File "/opt/pgadmin/venv/lib/python3.8/site-packages/pgadmin4/pgadmin/misc/bgprocess/processes.py", line 336, in start p = self.get_process_output(cmd, env) File "/opt/pgadmin/venv/lib/python3.8/site-packages/pgadmin4/pgadmin/misc/bgprocess/processes.py", line 374, in get_process_output p = Popen( File "/usr/lib/python3.8/subprocess.py", line 858, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.8/subprocess.py", line 1639, in _execute_child self.pid = _posixsubprocess.fork_exec( RuntimeError: preexec_fn not supported within subinterpretersWhich is causing due to change in version 3.8 - 'The preexec_fn parameter is no longer supported in subinterpreters.'. (Refer this link)I have tested the attached patch with dev env on Mac & centos platform. Also tested with installed pgadmin version with pip by manipulating corresponding files.Thanks,Yogesh MahajanEnterpriseDB
Akshay Joshi Principal Software Architect +91 9767888246 | |