From bb4910ba07ff7931e469c33d694794803a459a11 Mon Sep 17 00:00:00 2001 From: Eduardo Gurgel Pinho Date: Fri, 12 Jun 2026 15:35:21 +1200 Subject: [PATCH] fix: log when publication changes on Poller --- lib/extensions/postgres_cdc_rls/replication_poller.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/extensions/postgres_cdc_rls/replication_poller.ex b/lib/extensions/postgres_cdc_rls/replication_poller.ex index 22e9f060d..86fe4e257 100644 --- a/lib/extensions/postgres_cdc_rls/replication_poller.ex +++ b/lib/extensions/postgres_cdc_rls/replication_poller.ex @@ -252,10 +252,12 @@ defmodule Extensions.PostgresCdcRls.ReplicationPoller do defp check_oids(new_oids, %{conn: conn, oids: old_oids} = state) do case {map_size(old_oids), map_size(new_oids)} do {0, n} when n > 0 -> + Logger.info("ReplicationPoller's publication went from 0 to #{n} tables, starting replication") # prepare_replication/1 cancels check_oid_ref and reschedules it on success. prepare_replication(%{state | oids: new_oids}) {n, 0} when n > 0 -> + Logger.info("ReplicationPoller's publication went from #{n} to 0 tables, stopping replication") cancel_timer(state.poll_ref) # Cancel any pending :retry too: a retry left over from a prior # list_changes/5 error would otherwise fire after the slot is dropped and