Search code examples
subprocessodoo

(Odoo) Why can't i connect to the server when using pganonymizer?


I am trying to anonymize some data in my database but I am getting the following Error.

Postgres is running on port 5432 in the container and I am exposing it on the host on port 5433.

ports:
  - "5433:5432"

Am I supposed to add something in my odoo.conf file?

Thanks


Solution

  • The newest version of pganonymizer needs you to specify the postgres hostname and port in the subprocess command.

            if env.get('PGHOST'):
                cmd.extend(['--host', env['PGHOST']])
            if env.get('PGPORT'):
                cmd.extend(['--port', env['PGPORT']])