February 2020
Intermediate to advanced
734 pages
38h 13m
English
For this recipe, we will continue to use two servers: pg-primary as our main data source and pg-report as a reporting server. We will keep pgbench as our sample database. Follow these steps to create and map a user from pg-report to pg-primary within pgbench:
CREATE USER bench_user WITH PASSWORD 'testing';
CREATE USER MAPPING FOR bench_user
SERVER primary_db
OPTIONS (user 'bench_user', password 'testing');
SELECT u.rolname AS ...
Read now
Unlock full access