Preparar repositorio para despliegue: código fuente limpio
This commit is contained in:
parent
866f5c432d
commit
3eca832c1a
76 changed files with 5434 additions and 3496 deletions
13
init-db/00-replication-user.sql
Normal file
13
init-db/00-replication-user.sql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-- Create replication user for streaming replication
|
||||
-- This user will be used by the replica to connect to the primary
|
||||
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = 'replicator') THEN
|
||||
CREATE ROLE replicator WITH REPLICATION LOGIN PASSWORD 'replica_password';
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
||||
-- Grant necessary permissions
|
||||
GRANT CONNECT ON DATABASE rss TO replicator;
|
||||
Loading…
Add table
Add a link
Reference in a new issue