How to set the "target_session_attrs" attribute for postgresql connection ? #1660
-
Hello, I'm working on a symfony project with postgreqsql and multiple hosts for database. There is primary server and a replicated server. But if i invert the two IP, it doesn't work because all the requests reach the replicated server (the first IP) which is only in read-only mode. Here the pgsql documentation for this attribute : https://www.postgresql.org/docs/current/libpq-connect.html 1/ Is there an option to set this attribute ? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is not supported because it's not supported by DBAL, see here https://github.com/doctrine/dbal/blob/3.6.x/src/Driver/PgSQL/Driver.php You should add this feature request there. You are always free to create your own instance of the AbstractPostgreSQLDriver where you can put to |
Beta Was this translation helpful? Give feedback.
This is not supported because it's not supported by DBAL, see here https://github.com/doctrine/dbal/blob/3.6.x/src/Driver/PgSQL/Driver.php You should add this feature request there.
You are always free to create your own instance of the AbstractPostgreSQLDriver where you can put to
pg_connect
whatever you want though.