Re: [Patch] - Bug #7580 - uwsgi + nginx db backup does not work - Mailing list pgadmin-hackers

From Akshay Joshi
Subject Re: [Patch] - Bug #7580 - uwsgi + nginx db backup does not work
Date
Msg-id CANxoLDcX1P87-mR3VPcpm-HGyJmm7Bdxrv7qMaq_fq_G+WPXpw@mail.gmail.com
Whole thread Raw
In response to [Patch] - Bug #7580 - uwsgi + nginx db backup does not work  (Yogesh Mahajan <yogesh.mahajan@enterprisedb.com>)
List pgadmin-hackers
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 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


--

Akshay Joshi

Principal Software Architect

+91 9767888246

www.enterprisedb.com

     

pgadmin-hackers by date:

Previous
From: Akshay Joshi
Date:
Subject: pgAdmin 4 commit: Fixed an issue where backup does not work due to para
Next
From: Akshay Joshi
Date:
Subject: pgAdmin 4 commit: Added supported database servers in the release notes