1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 00:10:58 -05:00
Daggerbot-TS/postgres-replica-stuff/postgres-setup-replica.sql

9 lines
321 B
SQL

-- This is for the slave.
CREATE USER replicator WITH REPLICATION ENCRYPTED PASSWORD '<password_here>';
-- This is for the master.
SELECT * FROM pg_create_physical_replication_slot('replication_slot_slave');
SELECT * FROM pg_replication_slots;
-- https://medium.com/swlh/postgresql-replication-with-docker-c6a904becf77