-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postgres error: duplicate key value violates unique constraint "email_hash_pkey" #15451
Closed
2 of 6 tasks
Comments
I mean - it's in a transaction - it's supposed to fail. Fine I'll query the bloody db before inserting. |
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Apr 13, 2021
Some postgres users have logging which logs even failed transactions. So just query the db before trying to insert. Fix go-gitea#15451 Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath
added a commit
that referenced
this issue
Apr 15, 2021
Some postgres users have logging which logs even failed transactions. So just query the db before trying to insert. Fix #15451 Signed-off-by: Andrew Thornton art27@cantab.net Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Apr 15, 2021
…#15457) Backport go-gitea#15457 Some postgres users have logging which logs even failed transactions. So just query the db before trying to insert. Fix go-gitea#15451 Signed-off-by: Andrew Thornton art27@cantab.net Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
AbdulrhmnGhanem
pushed a commit
to kitspace/gitea
that referenced
this issue
Aug 10, 2021
…#15457) Some postgres users have logging which logs even failed transactions. So just query the db before trying to insert. Fix go-gitea#15451 Signed-off-by: Andrew Thornton art27@cantab.net Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
[x]
):Description
I already opened #14725 and also referring to #12577 and #12287
These issues are closed and a fix released, but it still doesn't fix my duplicate key violation errors.
Using gitea 1.13.7 and postgres 13.0 showing the following reoccuring errors:
2021-04-13 10:06:38.184 UTC [32] ERROR: duplicate key value violates unique constraint "email_hash_pkey"
2021-04-13 10:06:38.184 UTC [32] DETAIL: Key (hash)=(xxxxxxxxxxxxxxxxxxxx) already exists.
2021-04-13 10:06:38.184 UTC [32] STATEMENT: INSERT INTO "email_hash" ("hash","email") VALUES ($1,$2)
What somebody from previous tickets told me to do, but won't fix the duplicate key violation:
The text was updated successfully, but these errors were encountered: