BackfillPartitionedProjectDailyStatistics error during update
### Summary
<!-- Summarize the bug encountered concisely. -->
During 18.4.3 --> 18.5.3 update, Background migrations "BackfillPartitionedProjectDailyStatistics:project_daily_statistics failed.
### Steps to reproduce
<!-- Describe how one can reproduce the issue - this is very important. Please use an ordered list. -->
- Update from Gitlab CE 18.4.3 to Gitlab CE 18.5.3
- Check Background migrations
OS is AlmaLinux 8.10.
### Example Project
<!-- If possible, please create an example project here on GitLab.com that exhibits the problematic
behavior, and link to it here in the bug report. If you are using an older version of GitLab, this
will also determine whether the bug is fixed in a more recent version. -->
### What is the current *bug* behavior?
<!-- Describe what actually happens. -->
The "BackfillPartitionedProjectDailyStatistics: project_daily_statistics" job failed.
### What is the expected *correct* behavior?
<!-- Describe what you should see instead. -->
### Relevant logs and/or screenshots
<!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code
as it's tough to read otherwise. -->
```
BackfillPartitionedProjectDailyStatistics: project_daily_statistics
BackfillPartitionedProjectDailyStatistics: project_daily_statistics
Id Min Value Max Value Batch size Sub-batch size Interval Pause time (ms) Created on Last updated Status
648 233978 235407 50000 2500 120 100 2025-12-01 06:39:53 UTC 2025-12-01 07:02:02 UTC Failed
Failed jobs:
Id Started at Finished at Batch size
783 2025-12-01 07:01:07 UTC 2025-12-01 07:01:07 UTC 50000
Batched Job (Id: 783)
Id Min Value Max Value Batch size Started at Finished at Attempts Pause time (ms)
783 233978 235407 50000 2025-12-01 07:01:07 UTC 2025-12-01 07:01:07 UTC 3 100
Transition logs:
Id Created At Previous Status Next Status Exception Class Exception Message
1541 2025-12-01 06:58:04 UTC pending running
1543 2025-12-01 06:58:04 UTC running failed ActiveRecord::StatementInvalid PG::CheckViolation: ERROR: no partition of relation "project_daily_statistics_b8088ecbd2" found for row DETAIL: Partition key of the failing row contains (date) = (2025-08-01).
1545 2025-12-01 07:00:04 UTC failed running
1546 2025-12-01 07:00:05 UTC running failed ActiveRecord::StatementInvalid PG::CheckViolation: ERROR: no partition of relation "project_daily_statistics_b8088ecbd2" found for row DETAIL: Partition key of the failing row contains (date) = (2025-08-01).
1547 2025-12-01 07:01:07 UTC failed running
1549 2025-12-01 07:01:07 UTC running failed ActiveRecord::StatementInvalid PG::CheckViolation: ERROR: no partition of relation "project_daily_statistics_b8088ecbd2" found for row DETAIL: Partition key of the failing row contains (date) = (2025-08-01).
```
### Output of checks
<!-- If you are reporting a bug on GitLab.com, uncomment below -->
<!-- This bug happens on GitLab.com -->
<!-- and uncomment below if you have /label privileges -->
<!-- /label ~"reproduced on GitLab.com" -->
<!-- or follow up with an issue comment of `@gitlab-bot label ~"reproduced on GitLab.com"` if you do not -->
#### Results of GitLab environment info
<!-- Input any relevant GitLab environment information if needed. -->
<details>
<summary>Expand for output related to GitLab environment info</summary>
<pre>
```
System information
System:
Current User: git
Using RVM: no
Ruby Version: 3.2.8
Gem Version: 3.7.1
Bundler Version:2.7.1
Rake Version: 13.0.6
Redis Version: 7.2.11
Sidekiq Version:7.3.9
Go Version: unknown
GitLab information
Version: 18.5.3
Revision: 674bb93a1bf
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 16.10
URL: REMOVED
HTTP Clone URL: REMOVED
SSH Clone URL: REMOVED
Using LDAP: yes
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 14.45.3
Repository storages:
- default: unix:/var/opt/gitlab/gitaly/gitaly.socket
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Gitaly
- default Address: unix:/var/opt/gitlab/gitaly/gitaly.socket
- default Version: 18.5.3
- default Git Version: 2.50.1
```
</pre>
</details>
#### Results of GitLab application Check
<!-- Input any relevant GitLab application check information if needed. -->
<details>
<summary>Expand for output related to the GitLab application check</summary>
<pre>
```
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 14.45.3 ? ... OK (14.45.3)
Running /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-check
Internal API available: OK
Redis available via internal API: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes
Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... Server: ldapmain
LDAP authentication... Success
LDAP users with access to your GitLab server (only showing the first 100 results)
User output sanitized. Found 100 users of 100 limit.
Checking LDAP ... Finished
Checking GitLab App ...
Database config exists? ... yes
Tables are truncated? ... skipped
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Cable config exists? ... yes
Resque config exists? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units)
Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units)
Projects have namespace: ...
14/41 ... yes
14/42 ... yes
14/44 ... yes
14/45 ... yes
14/46 ... yes
14/47 ... yes
14/48 ... yes
14/49 ... yes
14/50 ... yes
14/51 ... yes
14/52 ... yes
14/53 ... yes
14/54 ... yes
14/55 ... yes
14/56 ... yes
14/57 ... yes
14/58 ... yes
14/59 ... yes
14/60 ... yes
14/61 ... yes
14/62 ... yes
14/63 ... yes
14/64 ... yes
14/65 ... yes
14/66 ... yes
14/67 ... yes
14/68 ... yes
24/69 ... yes
22/70 ... yes
22/71 ... yes
14/72 ... yes
22/73 ... yes
14/74 ... yes
22/75 ... yes
60/78 ... yes
30/79 ... yes
14/83 ... yes
23/84 ... yes
82/86 ... yes
30/87 ... yes
24/88 ... yes
9/89 ... yes
22/91 ... yes
22/92 ... yes
14/93 ... yes
14/94 ... yes
14/95 ... yes
91/96 ... yes
14/97 ... yes
2/98 ... yes
14/100 ... yes
14/102 ... yes
38/103 ... yes
14/104 ... yes
78/105 ... yes
14/106 ... yes
14/107 ... yes
14/108 ... yes
14/109 ... yes
14/110 ... yes
14/111 ... yes
14/113 ... yes
14/114 ... yes
14/116 ... yes
14/117 ... yes
45/119 ... yes
45/120 ... yes
45/121 ... yes
14/122 ... yes
14/123 ... yes
14/124 ... yes
14/125 ... yes
22/126 ... yes
14/127 ... yes
18/128 ... yes
14/129 ... yes
14/130 ... yes
2/131 ... yes
14/132 ... yes
14/133 ... yes
14/137 ... yes
9/138 ... yes
17/139 ... yes
17/140 ... yes
17/141 ... yes
17/142 ... yes
17/143 ... yes
19/144 ... yes
7/145 ... yes
9/151 ... yes
14/155 ... yes
17/156 ... yes
14/157 ... yes
17/158 ... yes
17/159 ... yes
14/160 ... yes
17/162 ... yes
17/163 ... yes
17/164 ... yes
17/165 ... yes
17/166 ... yes
17/167 ... yes
17/168 ... yes
17/169 ... yes
17/170 ... yes
17/171 ... yes
17/172 ... yes
17/173 ... yes
17/174 ... yes
17/175 ... yes
17/176 ... yes
17/177 ... yes
17/178 ... yes
17/179 ... yes
17/180 ... yes
17/181 ... yes
17/182 ... yes
17/183 ... yes
17/184 ... yes
17/185 ... yes
17/186 ... yes
17/187 ... yes
17/188 ... yes
17/189 ... yes
17/190 ... yes
17/191 ... yes
17/192 ... yes
119/193 ... yes
14/195 ... yes
45/196 ... yes
45/197 ... yes
14/198 ... yes
45/201 ... yes
14/202 ... yes
14/203 ... yes
45/204 ... yes
14/208 ... yes
17/215 ... yes
14/216 ... yes
14/217 ... yes
134/218 ... yes
14/219 ... yes
45/220 ... yes
14/221 ... yes
14/222 ... yes
18/223 ... yes
94/224 ... yes
14/225 ... yes
14/226 ... yes
14/227 ... yes
14/228 ... yes
14/229 ... yes
14/230 ... yes
14/231 ... yes
21/233 ... yes
14/234 ... yes
24/236 ... yes
14/239 ... yes
14/241 ... yes
14/242 ... yes
14/243 ... yes
55/245 ... yes
59/246 ... yes
63/247 ... yes
62/248 ... yes
61/249 ... yes
14/250 ... yes
41/251 ... yes
14/252 ... yes
14/256 ... yes
14/258 ... yes
14/259 ... yes
14/260 ... yes
14/268 ... yes
9/271 ... yes
14/272 ... yes
14/273 ... yes
78/274 ... yes
9/276 ... yes
9/277 ... yes
16/278 ... yes
76/279 ... yes
7/282 ... yes
14/284 ... yes
14/288 ... yes
14/289 ... yes
14/291 ... yes
78/300 ... yes
14/302 ... yes
14/305 ... yes
30/306 ... yes
14/309 ... yes
76/310 ... yes
14/311 ... yes
18/317 ... yes
14/319 ... yes
14/321 ... yes
14/322 ... yes
9/323 ... yes
14/324 ... yes
134/325 ... yes
82/326 ... yes
82/327 ... yes
14/328 ... yes
24/330 ... yes
14/331 ... yes
16/333 ... yes
88/335 ... yes
14/336 ... yes
14/337 ... yes
90/338 ... yes
90/340 ... yes
14/342 ... yes
14/343 ... yes
14/344 ... yes
14/345 ... yes
14/347 ... yes
9/348 ... yes
14/349 ... yes
14/350 ... yes
61/351 ... yes
14/353 ... yes
14/354 ... yes
14/356 ... yes
14/357 ... yes
78/358 ... yes
14/359 ... yes
18/360 ... yes
18/368 ... yes
14/373 ... yes
14/378 ... yes
14/379 ... yes
14/380 ... yes
14/381 ... yes
17/383 ... yes
78/385 ... yes
30/386 ... yes
90/387 ... yes
90/388 ... yes
24/389 ... yes
14/390 ... yes
14/391 ... yes
14/394 ... yes
2/395 ... yes
9/396 ... yes
75/397 ... yes
2/398 ... yes
14/399 ... yes
95/400 ... yes
60/401 ... yes
14/402 ... yes
14/403 ... yes
14/404 ... yes
14/405 ... yes
14/406 ... yes
95/407 ... yes
14/408 ... yes
14/409 ... yes
14/410 ... yes
14/413 ... yes
14/414 ... yes
16/415 ... yes
14/416 ... yes
14/419 ... yes
90/420 ... yes
2/421 ... yes
2/422 ... yes
2/423 ... yes
14/425 ... yes
14/427 ... yes
14/428 ... yes
14/429 ... yes
14/430 ... yes
14/431 ... yes
14/432 ... yes
9/435 ... yes
14/436 ... yes
45/437 ... yes
83/438 ... yes
134/439 ... yes
14/440 ... yes
14/441 ... yes
134/442 ... yes
47/444 ... yes
14/445 ... yes
2/446 ... yes
14/447 ... yes
14/448 ... yes
14/449 ... yes
14/450 ... yes
2/453 ... yes
95/454 ... yes
14/455 ... yes
109/458 ... yes
109/459 ... yes
109/460 ... yes
109/461 ... yes
90/462 ... yes
9/463 ... yes
78/464 ... yes
94/465 ... yes
14/466 ... yes
14/468 ... yes
14/469 ... yes
109/470 ... yes
109/471 ... yes
9/472 ... yes
14/473 ... yes
27/474 ... yes
78/478 ... yes
9/483 ... yes
14/485 ... yes
14/486 ... yes
14/488 ... yes
134/489 ... yes
14/490 ... yes
14/491 ... yes
14/492 ... yes
14/493 ... yes
14/494 ... yes
9/495 ... yes
134/497 ... yes
134/498 ... yes
58/499 ... yes
27/500 ... yes
14/501 ... yes
17/502 ... yes
14/503 ... yes
14/504 ... yes
22/505 ... yes
114/506 ... yes
114/507 ... yes
14/508 ... yes
115/509 ... yes
116/510 ... yes
81/511 ... yes
9/512 ... yes
55/514 ... yes
55/516 ... yes
55/517 ... yes
119/518 ... yes
119/519 ... yes
134/520 ... yes
78/521 ... yes
14/522 ... yes
14/523 ... yes
82/524 ... yes
14/526 ... yes
119/527 ... yes
119/528 ... yes
14/529 ... yes
14/530 ... yes
14/531 ... yes
17/533 ... yes
14/534 ... yes
14/535 ... yes
14/536 ... yes
14/537 ... yes
90/538 ... yes
45/543 ... yes
120/545 ... yes
14/546 ... yes
17/547 ... yes
14/548 ... yes
14/549 ... yes
14/550 ... yes
14/551 ... yes
82/552 ... yes
23/553 ... yes
14/554 ... yes
14/555 ... yes
14/556 ... yes
134/558 ... yes
14/559 ... yes
27/560 ... yes
16/561 ... yes
47/562 ... yes
134/563 ... yes
18/564 ... yes
14/566 ... yes
14/567 ... yes
14/568 ... yes
14/569 ... yes
45/570 ... yes
45/571 ... yes
14/572 ... yes
14/573 ... yes
14/575 ... yes
14/576 ... yes
17/577 ... yes
17/578 ... yes
14/579 ... yes
14/581 ... yes
14/582 ... yes
14/583 ... yes
14/584 ... yes
14/585 ... yes
14/586 ... yes
14/587 ... yes
14/588 ... yes
14/589 ... yes
14/590 ... yes
14/591 ... yes
14/592 ... yes
14/593 ... yes
14/594 ... yes
14/595 ... yes
14/596 ... yes
14/597 ... yes
23/599 ... yes
17/600 ... yes
59/601 ... yes
17/602 ... yes
9/603 ... yes
14/605 ... yes
14/606 ... yes
14/608 ... yes
134/609 ... yes
14/610 ... yes
14/611 ... yes
14/612 ... yes
14/613 ... yes
14/614 ... yes
14/615 ... yes
14/616 ... yes
131/617 ... yes
45/618 ... yes
45/619 ... yes
45/625 ... yes
134/629 ... yes
14/630 ... yes
27/631 ... yes
45/633 ... yes
14/634 ... yes
134/635 ... yes
45/636 ... yes
14/637 ... yes
45/638 ... yes
75/639 ... yes
14/641 ... yes
167/643 ... yes
167/644 ... yes
167/645 ... yes
167/646 ... yes
14/649 ... yes
14/650 ... yes
14/651 ... yes
16/652 ... yes
136/653 ... yes
14/654 ... yes
14/655 ... yes
24/656 ... yes
24/657 ... yes
24/658 ... yes
24/662 ... yes
24/664 ... yes
134/665 ... yes
14/669 ... yes
45/672 ... yes
45/673 ... yes
45/675 ... yes
45/676 ... yes
45/677 ... yes
45/679 ... yes
14/680 ... yes
75/681 ... yes
167/682 ... yes
167/683 ... yes
14/684 ... yes
134/685 ... yes
167/686 ... yes
14/687 ... yes
14/688 ... yes
134/689 ... yes
134/690 ... yes
223/691 ... yes
14/692 ... yes
14/693 ... yes
14/694 ... yes
14/695 ... yes
235/696 ... yes
235/698 ... yes
235/702 ... yes
235/703 ... yes
235/704 ... yes
235/705 ... yes
14/706 ... yes
14/708 ... yes
235/709 ... yes
14/710 ... yes
235/711 ... yes
235/712 ... yes
235/713 ... yes
167/714 ... yes
14/715 ... yes
167/716 ... yes
259/718 ... yes
235/719 ... yes
235/720 ... yes
45/721 ... yes
14/723 ... yes
235/724 ... yes
235/725 ... yes
75/726 ... yes
223/727 ... yes
235/728 ... yes
259/729 ... yes
45/730 ... yes
45/731 ... yes
14/732 ... yes
14/733 ... yes
14/734 ... yes
88/735 ... yes
75/736 ... yes
235/737 ... yes
14/738 ... yes
14/739 ... yes
235/740 ... yes
14/741 ... yes
45/742 ... yes
167/743 ... yes
134/744 ... yes
14/745 ... yes
14/746 ... yes
14/747 ... yes
167/748 ... yes
14/749 ... yes
14/750 ... yes
14/752 ... yes
14/753 ... yes
14/754 ... yes
14/755 ... yes
14/756 ... yes
167/757 ... yes
14/758 ... yes
14/759 ... yes
14/760 ... yes
74/761 ... yes
104/762 ... yes
765/763 ... yes
14/765 ... yes
14/767 ... yes
14/768 ... yes
134/769 ... yes
134/770 ... yes
223/771 ... yes
259/772 ... yes
14/773 ... yes
223/774 ... yes
83/775 ... yes
14/776 ... yes
14/777 ... yes
14/778 ... yes
14/779 ... yes
14/780 ... yes
167/781 ... yes
14/782 ... yes
24/783 ... yes
14/784 ... yes
14/785 ... yes
167/786 ... yes
167/787 ... yes
14/788 ... yes
14/789 ... yes
14/791 ... yes
134/792 ... yes
14/793 ... yes
14/794 ... yes
14/795 ... yes
14/796 ... yes
235/797 ... yes
14/798 ... yes
167/799 ... yes
82/800 ... yes
14/801 ... yes
763/802 ... yes
14/803 ... yes
829/804 ... yes
829/805 ... yes
829/806 ... yes
829/807 ... yes
230/808 ... yes
235/809 ... yes
14/810 ... yes
167/811 ... yes
829/812 ... yes
27/813 ... yes
14/814 ... yes
14/815 ... yes
14/816 ... yes
829/817 ... yes
167/818 ... yes
14/819 ... yes
17/820 ... yes
17/821 ... yes
223/822 ... yes
27/823 ... yes
14/824 ... yes
14/825 ... yes
865/826 ... yes
865/827 ... yes
58/828 ... yes
14/829 ... yes
14/830 ... yes
134/831 ... yes
167/832 ... yes
167/833 ... yes
167/834 ... yes
14/835 ... yes
167/836 ... yes
235/837 ... yes
14/838 ... yes
14/839 ... yes
14/840 ... yes
14/841 ... yes
16/842 ... yes
14/843 ... yes
167/844 ... yes
14/847 ... yes
14/848 ... yes
167/849 ... yes
45/850 ... yes
45/851 ... yes
14/852 ... yes
14/853 ... yes
223/854 ... yes
14/855 ... yes
82/856 ... yes
167/859 ... yes
82/860 ... yes
14/862 ... yes
167/863 ... yes
14/864 ... yes
14/865 ... yes
14/866 ... yes
14/867 ... yes
14/868 ... yes
14/869 ... yes
14/871 ... yes
167/872 ... yes
14/873 ... yes
914/874 ... yes
14/875 ... yes
27/876 ... yes
14/877 ... yes
14/878 ... yes
14/879 ... yes
14/880 ... yes
14/881 ... yes
134/882 ... yes
14/883 ... yes
230/884 ... yes
14/885 ... yes
134/886 ... yes
14/887 ... yes
942/888 ... yes
942/889 ... yes
230/890 ... yes
14/891 ... yes
33/892 ... yes
945/893 ... yes
942/894 ... yes
14/895 ... yes
14/896 ... yes
14/897 ... yes
230/898 ... yes
230/899 ... yes
230/900 ... yes
230/901 ... yes
230/902 ... yes
230/903 ... yes
230/904 ... yes
230/905 ... yes
230/906 ... yes
230/908 ... yes
14/909 ... yes
167/910 ... yes
829/911 ... yes
45/912 ... yes
45/913 ... yes
134/914 ... yes
134/915 ... yes
27/916 ... yes
14/917 ... yes
235/918 ... yes
14/919 ... yes
14/920 ... yes
235/921 ... yes
235/922 ... yes
14/923 ... yes
235/924 ... yes
235/925 ... yes
167/927 ... yes
942/928 ... yes
14/929 ... yes
Redis version >= 6.2.14? ... yes
Ruby version >= 3.0.6 ? ... yes (3.2.8)
Git user has default SSH configuration? ... yes
Active users: ... 54
Is authorized keys file accessible? ... yes
GitLab configured to store new projects in hashed storage? ... yes
All projects are in hashed storage? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
```
</pre>
</details>
### Possible fixes
<!-- If you can, link to the line of code that might be responsible for the problem. -->
### Patch release information for backports
#### High-severity bug remediation
issue