Skip to content
代码片段 群组 项目
用户头像
Stan Hu 编辑于
GitLab 17.2 shipped a migration
(https://gitlab.com/gitlab-org/gitlab/-/merge_requests/158711) that
dropped `p_ci_builds.id`. However, we received a number of reports of
users who had unrelated sequences owned by `p_ci_builds.id`, so the
migration failed because the objects depended on that column existing.

To allow migrations to go through, scan the system catalog for all
sequences owned by either `p_ci_builds` or `ci_builds`. Generate the
`ALTER SEQUENCE` statement to update the ownership of the sequence
using the technique described in
https://wiki.postgresql.org/wiki/Fixing_Sequences.

Note that we could run all 600+ `ALTER SEQUENCE` commands to bring the
database to a consistent state, but to minimize risk we target only on
the ones to allow the CI builds migration to proceed.

Changelog: fixed

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/468541
e18f5a7e
历史
用户头像 e18f5a7e
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。
名称 最后提交 最后更新
..