From 5c87b480de9a2cd7808421a386e617cc2bc07008 Mon Sep 17 00:00:00 2001 From: Kevin Biju Date: Fri, 20 Dec 2024 16:15:13 +0530 Subject: [PATCH] just always init it --- flow/connectors/postgres/postgres.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/flow/connectors/postgres/postgres.go b/flow/connectors/postgres/postgres.go index 58b2e090a..7dcdc3261 100644 --- a/flow/connectors/postgres/postgres.go +++ b/flow/connectors/postgres/postgres.go @@ -397,15 +397,9 @@ func pullCore[Items model.Items]( if err != nil { return err } - var childToParentRelIDMap map[uint32]uint32 - // only initialize the map if needed, escape hatch because custom publications may not have the right setting - if req.OverridePublicationName != "" || pgVersion < shared.POSTGRES_13 { - childToParentRelIDMap, err = GetChildToParentRelIDMap(ctx, c.conn, slices.Collect(maps.Keys(req.SrcTableIDNameMapping))) - if err != nil { - return fmt.Errorf("error getting child to parent relid map: %w", err) - } - } else { - childToParentRelIDMap = make(map[uint32]uint32) + childToParentRelIDMap, err := GetChildToParentRelIDMap(ctx, c.conn, slices.Collect(maps.Keys(req.SrcTableIDNameMapping))) + if err != nil { + return fmt.Errorf("error getting child to parent relid map: %w", err) } if err := c.MaybeStartReplication(ctx, slotName, publicationName, req.LastOffset, pgVersion); err != nil {