From a61517a83b81a472d4ace9c48d5ff5af5b608048 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Thu, 28 Sep 2023 20:00:02 -0500 Subject: [PATCH] SendBatch should pass ctx to StartPipeline https://github.com/jackc/pgx/issues/1748 --- conn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conn.go b/conn.go index 7d5b79d0..9a5bd55f 100644 --- a/conn.go +++ b/conn.go @@ -1090,7 +1090,7 @@ func (c *Conn) sendBatchQueryExecModeDescribeExec(ctx context.Context, b *Batch) } func (c *Conn) sendBatchExtendedWithDescription(ctx context.Context, b *Batch, distinctNewQueries []*pgconn.StatementDescription, sdCache stmtcache.Cache) (pbr *pipelineBatchResults) { - pipeline := c.pgConn.StartPipeline(context.Background()) + pipeline := c.pgConn.StartPipeline(ctx) defer func() { if pbr != nil && pbr.err != nil { pipeline.Close()