From d7c7523f985da8fbf09bcf67947a474a86f3db6e Mon Sep 17 00:00:00 2001 From: shunki-fujita Date: Mon, 1 Jul 2024 06:24:13 +0000 Subject: [PATCH] issue-710: Do not kill system user --- pkg/dbop/kill.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/dbop/kill.go b/pkg/dbop/kill.go index 366a776d9..39d255a8d 100644 --- a/pkg/dbop/kill.go +++ b/pkg/dbop/kill.go @@ -23,6 +23,9 @@ func (o *operator) KillConnections(ctx context.Context) error { if p.Host == "localhost" { continue } + if p.User == "system user" { + continue + } if _, err := o.db.ExecContext(ctx, `KILL CONNECTION ?`, p.ID); err != nil && !isNoSuchThread(err) { return fmt.Errorf("failed to kill connection %d for %s from %s: %w", p.ID, p.User, p.Host, err)