Enable pending builds table parity by default [RUN ALL RSPEC] [RUN AS-IF-FOSS]
What does this MR do?
This merge request adds support for using the newly introduced pending builds accelerated table. We are going to select pending builds from this queue and join ci_builds to make it possible to avoid traversing billions of builds stored in ci_builds table on large instances, like gitlab.com.
This merge request will:
- Migrate pending builds to ci_pending_buildstable in a post deployment migration
- Enable mechanisms used to maintain transactional parity between pending builds from ci_buildsandci_pending_builds
- Introduce mechanisms to select pending builds from ci_pending_buildsinstead ofci_builds
- Introduce mechanisms that will JOIN with ci_builds to read information that is still required, but not moved to ci_pending_buildsyet
- Hide these changes behind a feature flag that we will rollout when working on its rollout issue.
Conformity
- 
I have included a changelog entry. 
- 
I have added information for database reviewers in the MR description. 
- 
I have self-reviewed this MR per code review guidelines. 
Issues
Resolves #331417 (closed)
Edited  by Grzegorz Bizon