From e0234104bf156607df8fc77d1973ead0d7c91122 Mon Sep 17 00:00:00 2001 From: Rodrigo Bernardi Date: Thu, 11 Jan 2024 10:37:34 -0300 Subject: [PATCH] adjust reindex context --- pkg/db/index.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/db/index.go b/pkg/db/index.go index 8d9b59b..2fe5d91 100644 --- a/pkg/db/index.go +++ b/pkg/db/index.go @@ -132,12 +132,12 @@ func (pg *PgConnection) ReindexTable(ctx context.Context, schema, table string, if !noReindex { if useReindexConcurrently { - if err := pg.ReindexIndexConcurrently(ctx, &index, &initialIndexStats); err != nil { + if err := pg.ReindexIndexConcurrently(context.Background(), &index, &initialIndexStats); err != nil { pg.log.Errorf("failed on reindex concurrently: %s", err) isReindexed = false } } else { - if err := pg.ReindexIndexOldReplace(ctx, &index); err != nil { + if err := pg.ReindexIndexOldReplace(context.Background(), &index); err != nil { pg.log.Errorf("failed on reindex old replace: %w", err) isReindexed = false }