Preparar repositorio para despliegue: código fuente limpio

This commit is contained in:
jlimolina 2026-01-23 02:00:40 +01:00
parent 866f5c432d
commit 3eca832c1a
76 changed files with 5434 additions and 3496 deletions

View 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
$$;