gitea icon indicating copy to clipboard operation
gitea copied to clipboard

pq: table tid from new index tuple (1,147) overlaps with invalid duplicate tuple at offset 202 of block 5 in index "UQE_topic_name"

Open ik5 opened this issue 1 year ago • 2 comments

Description

I self host gitea Version 1.21.3 (also on earlier versions) on Linux with PostgreSQL.

Every package projects of mine uses, I mirror locally as well. Sometimes, when I mirror such git repo (usually from Github) I get the following error message:

pq: table tid from new index tuple (1,147) overlaps with invalid duplicate tuple at offset 202 of block 5 in index "UQE_topic_name"

When I remove the repo, and try again, after several attempts it will work.

There is no specific way to reproduce it, because it does not happens in consistent matter.

Gitea Version

1.21.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/ik5/41bfff2c0c037a8a2a63232682928c9a

Screenshots

No response

Git Version

2.39.3

Operating System

Rocky Linux

How are you running Gitea?

Standalone using systemd and with configuration file

Database

PostgreSQL

ik5 avatar Feb 01 '24 10:02 ik5

What's the PostgreSQL's version?

lunny avatar Feb 01 '24 11:02 lunny

oh, sorry, PostgreSQL v14

ik5 avatar Feb 01 '24 12:02 ik5

After migrating to PG 16, there were many duplicate topics (with the "semaphore" counting) some were with the value 1, and others with much more.

I unified them by hand, and at the moment there are no duplication errors.

Then I upgraded gitea to v1.21.5, and at the moment things looking good, but I will give it more time to see if the issue was old migration or another issue.

ik5 avatar Feb 11 '24 09:02 ik5

I think that there was an issue with the migration from old gitea to newer versions, can't reproduce it after removing duplicates by hand.

ik5 avatar Feb 20 '24 15:02 ik5