diff --git a/packages/sync-service/lib/electric/postgres/configuration.ex b/packages/sync-service/lib/electric/postgres/configuration.ex index 9ce4fff7b1..daba5ea65f 100644 --- a/packages/sync-service/lib/electric/postgres/configuration.ex +++ b/packages/sync-service/lib/electric/postgres/configuration.ex @@ -41,7 +41,7 @@ defmodule Electric.Postgres.Configuration do @doc """ Get Postgres server version """ - @spec get_pg_version(Postgrex.conn()) :: integer + @spec get_pg_version(Postgrex.conn()) :: non_neg_integer() def get_pg_version(conn) do case Postgrex.query( conn, diff --git a/packages/sync-service/lib/electric/replication/publication_manager.ex b/packages/sync-service/lib/electric/replication/publication_manager.ex index f717f1cf10..d69142644c 100644 --- a/packages/sync-service/lib/electric/replication/publication_manager.ex +++ b/packages/sync-service/lib/electric/replication/publication_manager.ex @@ -238,7 +238,7 @@ defmodule Electric.Replication.PublicationManager do Configuration.configure_tables_for_replication!( db_pool, Map.values(relation_filters), - fn -> pg_version end, + pg_version, publication_name ) diff --git a/packages/sync-service/test/support/component_setup.ex b/packages/sync-service/test/support/component_setup.ex index baf7cabb4c..1cd1be1865 100644 --- a/packages/sync-service/test/support/component_setup.ex +++ b/packages/sync-service/test/support/component_setup.ex @@ -71,8 +71,7 @@ defmodule Support.ComponentSetup do name: server, stack_id: ctx.stack_id, publication_name: ctx.publication_name, - db_pool: ctx.pool, - pg_version: Application.fetch_env!(:electric, :pg_version_for_tests) + db_pool: ctx.pool ) %{