I updated from 18.2.0-ee.0 to 18.5.3-ee.0 and then fail to update to 18.6.1-ee.0 with the following mesage:
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).
I tried gitlab-rake gitlab:db:create_dynamic_partitions which did not fix it.
I keep looking for other solutions, any suggestion is appreciated!
EDIT:
```console
root@git:~# gitlab-rake ‘gitlab:db:detach_partition’
rake aborted!
NoMethodError: undefined method to_sym' for nil:NilClass /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db/detach_partition.rake:25:in block (3 levels) in <top (required)>’
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db/detach_partition.rake:133:in block (3 levels) in <top (required)>' /opt/gitlab/embedded/bin/bundle:25:in ’
Tasks: TOP => gitlab:db:alter_partition
(See full trace by running task with --trace)
```
apt-get install postgresql-16-partman
Did not help as such.
in gitlab-pgsql:
```
CREATE TABLE project_daily_statistics_b8088ecbd2_y2025m0801
PARTITION OF project_daily_statistics_b8088ecbd2
FOR VALUES FROM (‘2025-08-01’) TO (‘2025-08-02’);
```
Helped as it moved to the next date, I now get:
```
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-02).
```
→ Had to drop this later DROP TABLE IF EXISTS project_daily_statistics_y2025m0801;
Also ran into:
LINE 7: ALTER TABLE “project_daily_statistics” OWNER TO “”;
So I didSo did ALTER TABLE “project_daily_statistics” OWNER TO “gitlab”;
But the script still had an empty ““ (replace_table.rb) → I changed the latter script and hardcoded “gitlab”.
That “helped”, but I got “PG::UndefinedTable: ERROR: relation “project_daily_statistics_b8088ecbd2” does not exist” .