Skip to content

Commit

Permalink
workload/schemachange: turn on exec logging
Browse files Browse the repository at this point in the history
This will help us see exactly which statements were executed by the
workload, including helper queries.

Release note: None
  • Loading branch information
rafiss committed Dec 19, 2024
1 parent a446c25 commit 26fb787
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkg/workload/schemachange/schemachange.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,16 @@ func (s *schemaChange) Ops(
// setClusterSettings configures any settings required for the workload ahead
// of starting workers.
func (s *schemaChange) setClusterSettings(ctx context.Context, pool *workload.MultiConnPool) error {
_, err := pool.Get().Exec(ctx, `SET CLUSTER SETTING sql.defaults.super_regions.enabled = 'on'`)
return errors.WithStack(err)
for _, stmt := range []string{
`SET CLUSTER SETTING sql.defaults.super_regions.enabled = 'on'`,
`SET CLUSTER SETTING sql.log.all_statements.enabled = 'on'`,
} {
_, err := pool.Get().Exec(ctx, stmt)
if err != nil {
return errors.WithStack(err)
}
}
return nil
}

// initSeqName returns the smallest available sequence number to be
Expand Down

0 comments on commit 26fb787

Please sign in to comment.