diff --git a/pglogrepl.go b/pglogrepl.go index bb5b547..5b106d0 100644 --- a/pglogrepl.go +++ b/pglogrepl.go @@ -139,8 +139,8 @@ func ParseIdentifySystem(mrr *pgconn.MultiResultReader) (IdentifySystemResult, e } row := result.Rows[0] - if len(row) != 4 { - return isr, fmt.Errorf("expected 4 result columns, got %d", len(row)) + if len(row) < 4 { + return isr, fmt.Errorf("expected at least 4 result columns, got %d", len(row)) } isr.SystemID = string(row[0]) @@ -247,8 +247,8 @@ func ParseCreateReplicationSlot(mrr *pgconn.MultiResultReader) (CreateReplicatio } row := result.Rows[0] - if len(row) < 4 { - return crsr, fmt.Errorf("expected at least 4 result columns, got %d", len(row)) + if len(row) != 4 { + return crsr, fmt.Errorf("expected 4 result columns, got %d", len(row)) } crsr.SlotName = string(row[0])