ejabberd icon indicating copy to clipboard operation
ejabberd copied to clipboard

Can't connect to PostgreSQL DB if the schema is not "public"

Open messagenius-admin opened this issue 4 years ago • 3 comments

Environment

  • ejabberd version: 20.12
  • Erlang version: any
  • OS: CentOS 8
  • Installed from: source (make rel)

Configuration (only if needed): grep -Ev '^$|^\s*#' ejabberd.yml

sql_type: pgsql
sql_server: "database-1.xxxx.eu-west-1.rds.amazonaws.com"
sql_database: "xxxx"
sql_username: "xxxx"
sql_password: "xxxx"
sql_port: 5434
... <<<---- I can't define my schema name here

Errors from error.log/crash.log

2021-01-25 23:20:48.496685+00:00 [warning] pgsql connection failed

Bug description

In PostgreSQL you can have multiple schemas in the same DB. There is no way in ejabberd.yml to specify which schema to use

messagenius-admin avatar Jan 25 '21 23:01 messagenius-admin

@vmsme: Have you same with the current ejabberd version?

Neustradamus avatar Apr 14 '21 02:04 Neustradamus

@vmsme: Have you same with the current ejabberd version?

Yes, I expect it, as that PGSQL feature is not supported.

mremond avatar Apr 15 '21 09:04 mremond

@vmsme: Have you same with the current ejabberd version?

Yes, I expect it, as that PGSQL feature is not supported.

Please can I lodge this as a feature request.

I plan to host on AWS RDS and there is a significant per-database cost which can be avoided if I can host multiple domains, each in their own schema.

I'm aware of the "new schema" feature to host multiple domains within the same schema, but that doesn't give me same deployment flexibility and isolation that I would get if ejabberd simply added a schema-name optoin as part of the db configuration.

moonlitknight avatar Aug 27 '22 18:08 moonlitknight