diff --git a/internal/db/schema/internal/postgres/postgres.go b/internal/db/schema/internal/postgres/postgres.go index c3e6df1af6..afc4daeeaa 100644 --- a/internal/db/schema/internal/postgres/postgres.go +++ b/internal/db/schema/internal/postgres/postgres.go @@ -208,6 +208,9 @@ func (p *Postgres) RollbackRun(ctx context.Context) error { defer func() { p.tx = nil }() + + // p.tx is set to nil after the commit so if p.tx == nil, we assume that the transaction has + // already been committed and do nothing if p.tx == nil { return nil }