From 6a4f1833bd87ef30ac356c231a4c26aefcea8b30 Mon Sep 17 00:00:00 2001 From: Rafi Shamim Date: Fri, 7 Nov 2025 13:16:12 -0500 Subject: [PATCH] sql: avoid buffering notice for upgrading to SERIALIZABLE This avoids flakiness in a test which expects the notice, but would sometimes not see it. Release note: None --- pkg/sql/conn_executor_ddl.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/sql/conn_executor_ddl.go b/pkg/sql/conn_executor_ddl.go index f7f32ff673b2..392c8fd9ff02 100644 --- a/pkg/sql/conn_executor_ddl.go +++ b/pkg/sql/conn_executor_ddl.go @@ -82,7 +82,13 @@ func (ex *connExecutor) maybeAdjustTxnForDDL(ctx context.Context, stmt Statement return err } ex.extraTxnState.upgradedToSerializable = true - p.BufferClientNotice(ctx, pgnotice.Newf("setting transaction isolation level to SERIALIZABLE due to schema change")) + if err := p.SendClientNotice( + ctx, + pgnotice.Newf("setting transaction isolation level to SERIALIZABLE due to schema change"), + false, /* immediateFlush */ + ); err != nil { + return err + } } else { return txnSchemaChangeErr }