From e850863296f3a0873f20871497fa4ac025cb21de Mon Sep 17 00:00:00 2001 From: JayT106 Date: Wed, 7 Jul 2021 06:28:54 -0400 Subject: [PATCH] state/indexer: close row after query (#6664) Closes: #6661 Note: see another error during the events indexing, guess the raw tx size exceeds the limitation? ``` 3:17PM ERR failed to index block txs err="pq: index row size 2768 exceeds btree version 4 maximum 2704 for index \"tx_results_tx_result_key\"" height=5205112 module=txindex --- state/indexer/sink/psql/psql.go | 1 + 1 file changed, 1 insertion(+) diff --git a/state/indexer/sink/psql/psql.go b/state/indexer/sink/psql/psql.go index 94ae4cb93..efb539e0b 100644 --- a/state/indexer/sink/psql/psql.go +++ b/state/indexer/sink/psql/psql.go @@ -110,6 +110,7 @@ func (es *EventSink) IndexTxEvents(txr []*abci.TxResult) error { if err != nil { return err } + defer r.Close() if !r.Next() { return nil