gitea: postgres ERROR: duplicate key value violates unique constraint "email_hash_pkey"
- Gitea version (or commit ref): v1.13.2 built with GNU Make 4.3, go1.15.7
- Git version: 2.26.2
- Operating system: Raspbian GNU/Linux 10, docker kunde21/gitea-arm v1.13.2-armv7
- Database (use
[x]):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Log gist:
Description
Using gitea 1.13.2 and postgres 13.0 I still have the following reoccuring postgres errors:
2021-02-16 21:31:14.345 UTC [20446] ERROR: duplicate key value violates unique constraint “email_hash_pkey” 2021-02-16 21:31:14.345 UTC [20446] DETAIL: Key (hash)=(xxxxxxxxxx) already exists. 2021-02-16 21:31:14.345 UTC [20446] STATEMENT: INSERT INTO “email_hash” (“hash”,“email”) VALUES ($1,$2)
I understand that this should be fixed in 1.13.0 via https://github.com/go-gitea/gitea/pull/12577 …
Screenshots
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 23 (9 by maintainers)
Commits related to this issue
- Fix postgres ID sequences broken by recreate-table Unfortunately there is a subtle problem with recreatetable on postgres which leads to the sequences not being renamed and not being left at 0. Fix ... — committed to zeripath/gitea by zeripath 3 years ago
- Fix postgres ID sequences broken by recreate-table (#15015) * Fix postgres ID sequences broken by recreate-table Unfortunately there is a subtle problem with recreatetable on postgres which leads... — committed to go-gitea/gitea by zeripath 3 years ago
- Fix postgres ID sequences broken by recreate-table (#15015) Backport #15015 Unfortunately there is a subtle problem with recreatetable on postgres which leads to the sequences not being renamed and ... — committed to zeripath/gitea by zeripath 3 years ago
- Fix postgres ID sequences broken by recreate-table (#15015) (#15029) Backport #15015 Unfortunately there is a subtle problem with recreatetable on postgres which leads to the sequences not being ... — committed to go-gitea/gitea by zeripath 3 years ago
thanks for your help @joseluisq - it was useful to go through the details to confirm my suspicions as to what was really happening.