qTest Controller - Setting up qTest Manager with Postgres Read Replica 9.6.1+ OnPremise


The goal for this process is to split complex queries from the production database. You can use this setup alongside the qTest Controller- setting up qTest Insights with Postgres Read Replica 9.6.1  instructions. qTest Manager and qTest Insights do not necessarily need to share the same Postgres replica instance.

Important Replication Lag Notice

Contrary to qTest Insights, qTest Manager is very sensitive with replication lag, since a single user interaction in qTest Manager could end up generating a 'write query' to the master and immediately 'read query' to the replica.

Usually, a replication lag of a subsecond (up to 1 second) shouldn't be problematic, but anything greater than that would cause an unexpected effect on qTest Manager's operation and sometimes end up becoming a bug for the application.


  • Your qTest Manager and qTest Sessions database are on the same Postgres database server.
  • This article assumes you have the knowledge to create a postgres read-replica server.

Note: These instructions are verified on qtestctl 6.3 (9.6.1) and qtestctl 6.4 (9.7.1).


Stop Manager

  • Linux (non-Docker)- Access the current directory "qtestctl" where you've installed your latest version of Manager.
    systemctl stop qtest
  • Windows
    C:\[path_to_qtestctl]>net stop qtest

Modify qtestctl/manager/build.gradle

  1. Line 227, replace: with,readOnlyEnable
    qtestctl/manager/build.gradle | Ex
    224 client.jdbc.postgres.url=${postgresUrl}
    225 client.jdbc.postgres.username=${pgUser}
    226 client.jdbc.postgres.password=${pgPwdEnv}
  2. Add the following lines below line number 227:
    client.jdbc.postgres.readonly.url=jdbc:postgresql://<YOUR READ REPLICA URL>:5432/${pgDbname}
    (Don't forget to fill your replicated DB information into the placeholders)
    qtestctl/manager/build.gradle | Ex
    228 client.jdbc.postgres.readonly.url=jdbc:postgresql://<YOUR READ REPLICA URL>:5432/${pgDbname}
    229 client.jdbc.postgres.readonly.username=${pgUser}
    230 client.jdbc.postgres.readonly.password=${pgPwdEnv}
    231 # search
    232 search.url=http://search:8080

Restart qTest Service and Verify 

  • Linux (non-Docker)
    $ systemctl start qtest
  • Windows
    C:\[path_to_qtestctl]>net start qtest

Access qTest Manager from the Product Navigator icon 9_box.png and verify connectivity

Powered by Zendesk