Skip to content

[BUG] duplicate key value violates unique constraint "frss_[user]_entry_id_feed_guid_key" after PGSQL 15 upgrade #4831

@gbakeman

Description

@gbakeman

Describe the bug
It seems that after upgrading PostgresQL to version 15, FreshRSS has a few persistent items in my feed that remain unread and I cannot mark them as read.

To Reproduce
Steps to reproduce the behavior:

  1. Have an active database in PGSQL 14 with several feeds and items.
  2. Upgrade the database to version 15, and run it with the same version of Postgres.
  3. FreshRSS seems to encounter multiple errors as a result.

Expected behavior
Feed items are marked read correctly.

Logs

FreshRSS[3253]: [user] [Mon, 07 Nov 2022 14:56:39 -0800] [error] --- SQL error markRead 1: ERROR:  duplicate key value violates unique constraint "frss_[user]_entry_id_feed_guid_key"
FreshRSS[3253]: DETAIL:  Key (id_feed, guid)=(8, https://www.airportceo.com/post/airport-ceo-1-0-released) already exists.
172.18.0.10 - - [07/Nov/2022:14:56:39 -0800] "POST /i/?c=entry&a=read HTTP/1.1" 200 11 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"
FreshRSS[3253]: [user] [Mon, 07 Nov 2022 14:56:39 -0800] [error] --- SQL error markRead 1: ERROR:  duplicate key value violates unique constraint "frss_[user]_entry_id_feed_guid_key"
FreshRSS[3253]: DETAIL:  Key (id_feed, guid)=(49, https://bitwarden.com/blog/stay-secure-by-avoiding-7-common-password-sharing-mistakes/) already exists.
172.18.0.10 - - [07/Nov/2022:14:56:39 -0800] "POST /i/?c=entry&a=read HTTP/1.1" 200 11 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"
FreshRSS[3253]: [user] [Mon, 07 Nov 2022 14:56:40 -0800] [error] --- SQL error markRead 1: ERROR:  duplicate key value violates unique constraint "frss_[user]_entry_id_feed_guid_key"
FreshRSS[3253]: DETAIL:  Key (id_feed, guid)=(49, https://bitwarden.com/blog/staying-safe-online-for-cyber-monday/) already exists.
172.18.0.10 - - [07/Nov/2022:14:56:40 -0800] "POST /i/?c=entry&a=read HTTP/1.1" 200 11 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"

Environment information (please complete the following information):

  • OS: Windows 10
  • Browser: Firefox Desktop 106
  • FreshRSS version: 1.20.0
  • Database version: PostgresQL 15
  • PHP version: 7.4.30
  • Installation type: Docker freshrss/freshrss:1.20.0.812e65447b93021bdb752b4e4f2fb057422daa57

Additional context
I've upgraded my database following this guide/docker image. Could something have changed between version 14 and 15 that's broken compatibility with FreshRSS?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions