getsentry / getsentry/self-hosted
Upgrading from 26.8 to 26.9 failed (could not create unique index "perf_unique_org_string_usecase")
- Dominant language
- Shell
- Stars
- 9.6k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 15
Description
### Self-Hosted Version
26.9
### CPU Architecture
x86_64
### Docker Version
26.1.4
### Docker Compose Version
2.27.1
### Machine Specification
- [x] My system meets the minimum system requirements of Sentry
### Installation Type
Upgrade from 26.8 to 26.9
### Steps to Reproduce
```
▶ Ensuring proper PostgreSQL version ...
Container sentry-self-hosted-postgres-1 Creating
Container sentry-self-hosted-postgres-1 Created
Container sentry-self-hosted-postgres-1 Starting
Container sentry-self-hosted-postgres-1 Started
Container sentry-self-hosted-postgres-1 Waiting
Container sentry-self-hosted-postgres-1 Healthy
Re-indexing due to glibc change, this may take a while...
ERROR: could not create unique index "perf_unique_org_string_usecase"
DETAIL: Key (string, organization_id, use_case_id)=(d:transactions/measurements.cls@ratio, 1, transactions) is duplicated.
Error in install/upgrade-postgres.sh:53.
'$dc exec postgres psql -U postgres -v ON_ERROR_STOP=1 -c "REINDEX DATABASE postgres;"' exited with status 1
-> ./install.sh:main:41
--> install/upgrade-postgres.sh:source:53
Cleaning up...
```
### Expected Result
I should be able to upgrade from 26.8 to 26.9.
### Actual Result
I cannot upgrade from 26.8 to 26.9
### Event ID
_No response_
Contributor guide
Research direction
Start with install/upgrade-postgres.sh at line 53 and install.sh at line 41, then review the PostgreSQL upgrade and reindex commands shown in the failure. Reproduce the 26.8-to-26.9 upgrade with the duplicate key data, identify how the unique index migration should handle it, and verify that the upgrade completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, postgresql, shell
- Domain
- database, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100