-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Gitea 1.15 does not work on postgres <9.5: Submitting a new issue gives 500 error #17067
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
Comments
what version of Postgres are you running? |
The SQL this is failing on is: INSERT INTO issue_index (group_id, max_index) "+
"VALUES (?,1) ON CONFLICT (group_id) DO UPDATE SET max_index = issue_index.max_index+1 which implies you have a version of Postgres that does not support ON CONFLICT This has been present in Postgres since version 9.5 which itself is so old that it is unsupported by Postgres. You need to upgrade your version of Postgres. |
9.2. So i will try to update postgres. I'll report you, thanks. |
I don't think we state anywhere what the minimal supported version of postgres is but I think it's entirely reasonable to set that at at least 9.5. I guess we need to detect the version of postgres at time of startup and warn users and update the documentation. |
I've retitled the bug - so a PR doing the above could reference this issue and close it. |
Ok, thank you for the effort. Ii is fine to specify minimum requirements of the database from now on. However, my only issue is the creation of a issue, git interation is still ok. |
Yeah unfortunately we absolutely have to have postgres >= 9.5. I've added a docs PR so I will close this now. |
I confirm that upgrading postgres to 9.6 solved the problem. |
Gitea Version
1.15.2
Git Version
2.16.5
Operating System
Linux RHEL 7.6
How are you running Gitea?
Downloaded the 64bit version binary Linux executable, and running it as a service.
Database
PostgreSQL
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
2021/09/16 10:00:32 models/issue.go:1012:NewIssue() [I] [SQL] ROLLBACK [] - 40.9
49µs
2021/09/16 10:00:32 ...rs/web/repo/issue.go:980:NewIssuePost() [E] NewIssue: gen
erate issue index failed: pq: syntax error at or near "ON"
Description
Updated from gitea 1.14.6 to 1.15.2. Now, creating a new issue in every repository gives a 500 error.
Screenshots
No response
The text was updated successfully, but these errors were encountered: