Insert at most 1,000 rows at once in MR diff background migration
requested to merge 36631-activerecord-statementinvalid-pg-querycanceled-error-canceling-statement-due-to-statement-timeout into master
What does this MR do?
Prevent statement timeouts from happening by limiting individual INSERT
statements to 1,000 rows for commits, and 100 rows for diff files.
Are there points in the code the reviewer needs to double check?
These limits are pretty arbitrary - should they be lower?
Why was this MR needed?
We are getting a lot of dead tuples in production.
Does this MR meet the acceptance criteria?
-
Tests added for this feature/bug - Review
-
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes #36631 (closed) and #37505 (closed).
Edited by Yorick Peterse