Menu

qTest Controller: Install qTest with DB's Non-Superuser

Overview

The default user created when installing PostgreSQL is "postgres", however, some choose to create and user a different user.  The postgres user has specific roles required to create databases within Postgres and to use a different user, you must grant those permissions to that user.

To install our products using another user, you need to:

  • Create the new user
  • Grant privileges with the script below
  • Create a new database with this new user
  • Apply all schema updates with this new user

These instructions can be applied for both AWS RDS Postgres and self-hosted Postgres.
IMPORTANT: DO NOT create username named 'qtest'

Login to postgres database as postgres user and create new user

Follow these steps:

  1. Login with user postgres. (qtestapp user is just an example)
    create user qtestapp with password <password> login;
    alter user qtestapp createdb;
  2. Login to postgres database as qtestapp and create new database.
    create database qtest_manager;
    create database qtest_sessions;
    create database qtest_parameters;
    create database qtest_pulse;
  3. Login to postgres as postgres user and create extensions and change schema owner.

-- connect to qtest_manager;
create extension postgres_fdw;
create extension tablefunc;
alter schema public owner to qtestapp;
grant usage on foreign data wrapper postgres_fdw to qtestapp ;

-- connect to qtest_sessions;
create extension postgres_fdw;
create extension tablefunc;
alter schema public owner to qtestapp ;
grant usage on foreign data wrapper postgres_fdw to qtestapp ;

-- connect to qtest_parameters;
create extension postgres_fdw;
create extension tablefunc;
alter schema public owner to qtestapp;
grant usage on foreign data wrapper postgres_fdw to qtestapp;


-- connect to qtest_pulse;
create extension postgres_fdw;
create extension tablefunc;
alter schema public owner to qtestapp;
grant usage on foreign data wrapper postgres_fdw to qtestapp;
create extension if not exists "uuid-ossp";

4. Configure qtestapp user and new databases in qtest.config

Powered by Zendesk