Skip to content

Change to set local statement timeout on primary db

Tianwen Chen requested to merge 423135-transaction into master

What does this MR do and why?

After having deployed this MR !130599 (merged) and enabled the feature flag (see slack), the logs show that ANALYZE statements generated the following errors:

  • canceling statement due to statement timeout
  • cannot execute ANALYZE during recovery

See https://log.gprd.gitlab.net/app/r/s/2m6nT

Although the above errors are not show stopper, this MR is to:

  • make sure statement timeout have effects and is wrapped in a transaction
  • only run ANALYZE on primary

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #423135 (closed)

Edited by Tianwen Chen

Merge request reports

Loading