From d19653d6cee66ff79486f4094040495233678653 Mon Sep 17 00:00:00 2001 From: Jamie Isaacs Date: Mon, 3 May 2021 15:17:33 -0700 Subject: [PATCH] Close rows on batch insert to avoid timeout issues. Releasing v0.9.0 --- provider/postgresstore/postgres_store.go | 1 + store.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/provider/postgresstore/postgres_store.go b/provider/postgresstore/postgres_store.go index e15743c..d8fd5f6 100644 --- a/provider/postgresstore/postgres_store.go +++ b/provider/postgresstore/postgres_store.go @@ -401,6 +401,7 @@ func (s *postgresStore) batchInsert(ctx context.Context, transaction dbQueryable if err != nil { return nil, 0, fmt.Errorf("unable to insert: %v", err) } + defer ignoreClose(rows) var globalSequenceNumbers []uint64 if !s.pgNotifyIsEnabled { diff --git a/store.go b/store.go index 66bebbb..0a3e8b0 100644 --- a/store.go +++ b/store.go @@ -8,7 +8,7 @@ import ( ) // Version for RangeDB. -const Version = "0.9.0-dev" +const Version = "0.9.0" // Record contains event data and metadata. type Record struct {