Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
# start the database cluster
pg_ctl -D /var/lib/postgresql/daselement-munich_publication start

Create default Postgres UserPostgres Users - make sure that the Users exist in all the other databases as well

Code Block
# access the database via psql
psql --port=5432 postgres

# create superuser for IT/admins and pipeline TDs
CREATE ROLE postgres LOGIN password 'postgres';
ALTER USER root CREATEDB;
ALTER USER root CREATEROLE;
ALTER USER root SUPERUSER;

# create user that is allowed to create new databases and read/write information
CREATE ROLE dbuser LOGIN password 'dbuser';
ALTER USER root CREATEDB;

# create replication user that is used by the other facilites
CREATE ROLE user_replication WITH REPLICATION LOGIN password 'password';

# exit the database from psql
\q

...

Code Block
# create database from primary database
psql --port=5460 postgres

# create an empty database where the information will be replicated to
create database rep_de_munich_vfxelements

# expected ouptut: CREATE DATABASE

Now copy over all the information from the primary to the subscriber

Code Block
breakoutModefull-width
# use pg_dump to copy the data
pg_dump -s de_munich_vfxelements -p 5432 | psql -h 192.168.178.50 -p 5432 rep_de_munich_vfxelements

3 create subscription

The last step is now to subscribe to the other facility publication.

...