migration-timeout-requires-justification
Require an explicit operational reason for migration timeout settings.
Why
Routine SET/RESET timeout headers duplicate session policy and change migration failure behavior without recording why a migration needs a different deadline or lock wait.
Fix
Review and remove unnecessary timeout bookkeeping, or put a standalone -- timeout-justification: <setting> -- <operational reason> immediately before each justified statement. The setting must match; reviewers assess the reason. Do not remove a timeout merely because its reason is missing.
Examples
RESET lock_timeout;-- timeout-justification: lock_timeout -- restore the session default after the reviewed lock overrideRESET lock_timeout;SET statement_timeout = '10min';-- timeout-justification: statement_timeout -- bounded backfill exceeds the session defaultSET statement_timeout = '10min';