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
14
init-db/00-replication-slot.sql
Normal file
14
init-db/00-replication-slot.sql
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-- Enable replication access from the replica container
|
||||
-- This file is sourced after the database is initialized
|
||||
|
||||
-- Add pg_hba.conf entry for replication
|
||||
-- Note: This needs to be done via ALTER SYSTEM or pg_hba.conf file
|
||||
|
||||
DO $$
|
||||
BEGIN
|
||||
-- Create replication slot to prevent WAL removal
|
||||
IF NOT EXISTS (SELECT 1 FROM pg_replication_slots WHERE slot_name = 'replica_slot') THEN
|
||||
PERFORM pg_create_physical_replication_slot('replica_slot');
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
Loading…
Add table
Add a link
Reference in a new issue