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

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: Yogesh Mahajan <yogesh(dot)mahajan(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [Patch] - Bug #7580 - uwsgi + nginx db backup does not work
Date: 2022-09-02 08:08:02
Message-ID: CANxoLDcX1P87-mR3VPcpm-HGyJmm7Bdxrv7qMaq_fq_G+WPXpw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks, the patch was applied.

On Fri, Sep 2, 2022 at 12:51 PM Yogesh Mahajan <
yogesh(dot)mahajan(at)enterprisedb(dot)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
> <https://docs.python.org/3/library/subprocess.html>)
>
>
> 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
>

--

<http://www.enterprisedb.com>

Akshay Joshi

Principal Software Architect

+91 9767888246

www.enterprisedb.com

<https://www.linkedin.com/company/edbpostgres>
<https://twitter.com/edbpostgres?lang=en>
<https://www.facebook.com/EDBpostgres>
<https://www.instagram.com/EDBpostgres/>

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2022-09-05 10:00:31 pgAdmin 4 commit: Added supported database servers in the release notes
Previous Message Akshay Joshi 2022-09-02 07:43:32 pgAdmin 4 commit: Fixed an issue where backup does not work due to para