Skip to content

Commit

Permalink
drop replication slot, if it already exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
ePaul committed Aug 22, 2023
1 parent 05c5a32 commit 945d6ef
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CREATE PUBLICATION nakadi_producer_eventlog
FOR TABLE nakadi_events.event_log;
CREATE PUBLICATION nakadi_producer_fes
FOR TABLE nakadi_events.event_log;

COMMENT ON PUBLICATION nakadi_producer_eventlog
IS 'Publication for collecting event data data via Fabric Event Streams.'
'If you didn''t set FES up, it won''t be used and do no harm.';
COMMENT ON PUBLICATION nakadi_producer_fes
IS 'Publication for collecting event data data via Fabric Event Streams.'
'If you didn''t set FES up, it won''t be used and do no harm.';

-- We drop the slot in case it already exists (e.g. created by Patroni from the database manifest),
-- as it needs to be created after the publication.
SELECT pg_drop_replication_slot(slot_name)
FROM pg_replication_slots
WHERE slot_name = 'nakadi_producer_fes';

0 comments on commit 945d6ef

Please sign in to comment.