Cannot create mirror repository: sql syntax error #9756

Closed
opened 2025-11-02 08:48:42 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @stephens2424 on GitHub (Oct 31, 2022).

Description

I'm getting an error when I try to create a new migration repository (a mirror). The key error I see in the logs when I do it is:

...ervices/task/task.go:56:handle() [E] Run task failed: pq: syntax error at or near "ON"

The web UI still says "migrating git data" just before it switches to an error message.

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/stephens2424/b09a35df5ea748543ce629b76e59b06c

Screenshots

No response

Git Version

2.25.1

Operating System

Ubuntu 20.04

How are you running Gitea?

Using binary release with systemd, hosted on a digitalocean instance.

Database

PostgreSQL

Originally created by @stephens2424 on GitHub (Oct 31, 2022). ### Description I'm getting an error when I try to create a new migration repository (a mirror). The key error I see in the logs when I do it is: ``` ...ervices/task/task.go:56:handle() [E] Run task failed: pq: syntax error at or near "ON"``` The web UI still says "migrating git data" just before it switches to an error message. ### Gitea Version 1.17.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/stephens2424/b09a35df5ea748543ce629b76e59b06c ### Screenshots _No response_ ### Git Version 2.25.1 ### Operating System Ubuntu 20.04 ### How are you running Gitea? Using binary release with systemd, hosted on a digitalocean instance. ### Database PostgreSQL
GiteaMirror added the issue/needs-feedback label 2025-11-02 08:48:42 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Oct 31, 2022):

Your PgSQL version might be very old. Please use PgSQL >= 10 .

@wxiaoguang commented on GitHub (Oct 31, 2022): Your PgSQL version might be very old. Please use PgSQL >= 10 .
Author
Owner

@wxiaoguang commented on GitHub (Oct 31, 2022):

Maybe related to

@wxiaoguang commented on GitHub (Oct 31, 2022): Maybe related to * https://github.com/go-gitea/gitea/issues/19927#issuecomment-1151190010
Author
Owner

@stephens2424 commented on GitHub (Nov 1, 2022):

You're right. I forgot that postgres runs multiple versions under the hood, I was only looking at the primary installed version when I originally thought I was up to date (i.e. what apt shows as installed) at first, but that's misleading! The gitea database can be in a postgres "cluster" that's on an earlier version than that still.

Sorry for the noise, thanks for the help!

@stephens2424 commented on GitHub (Nov 1, 2022): You're right. I forgot that postgres runs multiple versions under the hood, I was only looking at the primary installed version when I originally thought I was up to date (i.e. what apt shows as installed) at first, but that's misleading! The gitea database can be in a postgres "cluster" that's on an earlier version than that still. Sorry for the noise, thanks for the help!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9756