1
0
mirror of https://github.com/coltoneshaw/CS-Repro-Mattermost.git synced 2025-12-23 18:11:34 +01:00

added initial setup of replicas

This commit is contained in:
coltoneshaw
2024-03-29 17:21:34 -04:00
parent 492130d846
commit 21fdbf5a37
13 changed files with 239 additions and 15 deletions

View File

@@ -1,3 +1,10 @@
#!/bin/bash
echo "include '/files/postgres/primary/primary_config.conf'" >> /var/lib/postgresql/data/postgresql.conf
echo "include '/files/postgres/primary/primary_config.conf'" >> /var/lib/postgresql/data/postgresql.conf
psql -U mmuser -d mattermost -c "create role replicauser with replication password 'replicauser_password' login"
psql -U mmuser -d mattermost -c "select pg_create_physical_replication_slot('replica_2_slot');"
psql -U mmuser -d mattermost -c "select pg_create_physical_replication_slot('replica_1_slot');"
echo "host replication replicauser 0.0.0.0/0 md5" >> /var/lib/postgresql/data/pg_hba.conf