From 75743355186de9fdcb3039b5f2a1a781bb76906f Mon Sep 17 00:00:00 2001 From: Mohamad Fadhil Date: Tue, 17 Dec 2024 15:46:17 +0800 Subject: [PATCH] remove insertbatch in statestore plugin (#103) --- plugins/statestore/postgres/postgres.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/plugins/statestore/postgres/postgres.go b/plugins/statestore/postgres/postgres.go index ca1b741..c4f2058 100644 --- a/plugins/statestore/postgres/postgres.go +++ b/plugins/statestore/postgres/postgres.go @@ -57,13 +57,6 @@ var ( type DurableStore struct { db postgres.Postgres sb sq.StatementBuilderType - // insertBatchSize represents the chunk of data to bulk insert. - // This helps avoid the postgres 65535 parameter limit. - // This is necessary because Postgres uses a 32-bit int for binding input parameters and - // is not able to track anything larger. - // Note: Change this value when you know the size of data to bulk insert at once. Otherwise, you - // might encounter the postgres 65535 parameter limit error. - insertBatchSize int // hold the connection state to avoid multiple connection of the same instance connected *atomic.Bool } @@ -78,7 +71,6 @@ func NewStateStore(config *Config) *DurableStore { return &DurableStore{ db: db, sb: sq.StatementBuilder.PlaceholderFormat(sq.Dollar), - insertBatchSize: 500, connected: atomic.NewBool(false), } }