TeamAddRepository: recalculateAccesses: insert new accesses: pq: duplicate key value violates unique constraint "UQE_access_s" #12341

Closed
opened 2025-11-02 10:06:10 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @MaoChhaya on GitHub (Jan 17, 2024).

Description

I am using Tarraform to create multiple teams and include multiple repositories at the same time. It does not happen only when creating, it also happens when deleting. I have tested this many times, I found some solutions to make it work.

  1. Set env GITEA__database__MAX_OPEN_CONNS=1 but I will get another when I checkout a new branch on UI (I don't remember what it is).
  2. It worked fine if using MySQL instead of Postgres. All of my other services is being used Postgres, I would like to install gitea with Postgres too

Gitea Version

1.21.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Gitea logs

Screenshot from 2024-01-17 12-04-06

Postgres logs

Screenshot from 2024-01-17 12-05-53

Git Version

1.21.3

Operating System

No response

How are you running Gitea?

Using Docker

Database

PostgreSQL

Originally created by @MaoChhaya on GitHub (Jan 17, 2024). ### Description I am using Tarraform to create multiple teams and include multiple repositories at the same time. It does not happen only when creating, it also happens when deleting. I have tested this many times, I found some solutions to make it work. 1. Set env `GITEA__database__MAX_OPEN_CONNS=1` but I will get another when I checkout a new branch on UI (I don't remember what it is). 2. It worked fine if using MySQL instead of Postgres. All of my other services is being used Postgres, I would like to install gitea with Postgres too ### Gitea Version 1.21.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots ### Gitea logs ![Screenshot from 2024-01-17 12-04-06](https://github.com/go-gitea/gitea/assets/28974602/b500ee7c-57ca-49b5-98ba-039312b855fa) ### Postgres logs ![Screenshot from 2024-01-17 12-05-53](https://github.com/go-gitea/gitea/assets/28974602/ebace33c-482e-405f-9299-c61907e7b1d9) ### Git Version 1.21.3 ### Operating System _No response_ ### How are you running Gitea? Using Docker ### Database PostgreSQL
GiteaMirror added the type/bugissue/needs-feedback labels 2025-11-02 10:06:10 -06:00
Author
Owner

@yp05327 commented on GitHub (Mar 8, 2024):

Thanks for your report. It looks like a bug.
Can you provide some details about the post data of these API calls of creating org, teams and repos.
These can help us reproduce it and figure out the problem, thanks.

@yp05327 commented on GitHub (Mar 8, 2024): Thanks for your report. It looks like a bug. Can you provide some details about the post data of these API calls of creating org, teams and repos. These can help us reproduce it and figure out the problem, thanks.
Author
Owner

@GiteaBot commented on GitHub (Apr 21, 2024):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Apr 21, 2024): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12341