From 817625c169ba77e6a10458c5f8c2bec28ab636c0 Mon Sep 17 00:00:00 2001 From: Oleksii Sholik Date: Wed, 22 Nov 2023 17:19:02 +0200 Subject: [PATCH] Preload internal schema in SchemaCache before looking up an internal relation --- .../electric/lib/electric/postgres/extension/schema_cache.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/components/electric/lib/electric/postgres/extension/schema_cache.ex b/components/electric/lib/electric/postgres/extension/schema_cache.ex index 827ade3848..c5a3ac402f 100644 --- a/components/electric/lib/electric/postgres/extension/schema_cache.ex +++ b/components/electric/lib/electric/postgres/extension/schema_cache.ex @@ -379,6 +379,7 @@ defmodule Electric.Postgres.Extension.SchemaCache do end def handle_call({:internal_relation, relation}, _from, state) do + state = load_internal_schema(state) {:reply, Schema.table_info(state.internal_schema, relation), state} end