Dear JA,
Please use below code.
Modified the openerp/tools/misc.py
as follows:
def exec_pg_command(name, *args):
prog = find_pg_tool(name)
env = exec_pg_environ()
with open(os.devnull) as dn:
# default commit 4bd2ee1
# https://github.com/odoo/odoo/commit/4bd2ee1aaace8e7f6fa5621688e00dc2115fa8a7
# args2 = (prog,) + args
# rc = subprocess.call(args2, env=env, stdout=dn, stderr=subprocess.STDOUT)
# if rc:
# raise Exception('Postgres subprocess %s error %s' % (args2, rc))
#
#
# new modification maclarensg
# https://github.com/odoo/odoo/issues/5241#issuecomment-76509036
rc = subprocess.call((prog,) + args, env=env, stdout=dn, stderr=subprocess.STDOUT)
# new modification end
Hope this help for you.
Cheers,
Ankit H Gandhi.