Can you add a unit test for set_env_variables() please?
This function is a part of a BatchProcess class which is used by all backup/restore/maintenance etc modules. So, when we write test cases for this module this function will be covered.
We can simplify this, we don't need to create any extra column,
Check: ../pgadmin4/web/pgadmin/tools/import_export/__init__.py +322 where we are setting ENV variable we can create common utility function (let say in ../tools/utils/__init__.py) which will set all required the environment variables and then we will pass that function in p.start(..) method.