You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Google Reader API edit-tag marks articles read one per transaction on PostgreSQL and SQLite #9574
On PostgreSQL (and SQLite), marking a list of articles read through the Google Reader API (edit-tag) runs one transaction per article. FreshRSS_EntryDAOSQLite::markRead() loops over the IDs (//TODO: Not implemented yet for SQLite (so always call IDs one by one)), and FreshRSS_EntryDAOPGSQL inherits that loop.
With a database across a network, each ID costs several round trips (BEGIN, UPDATE, sometimes a feed counter UPDATE, COMMIT). Against a managed PostgreSQL about 100 ms away per query, an edit-tag with a few hundred IDs took 50–120 s. Reeder on iOS gave up after about 30 s and resent the same batch on every sync, so it never fetched new articles. The server did finish each request eventually, so read states were saved, but the client never saw a success.
To Reproduce
Use PostgreSQL with some network latency (e.g. tc qdisc add dev eth0 root netem delay 25ms on the database host).
Through the Google Reader API, mark ~300 unread articles read in a single edit-tag request (a=user/-/state/com.google/read with many i= values).
The request takes about a minute (60.5 s in my test at ~75 ms round trip).
Expected behavior
One batched UPDATE … WHERE is_read<>? AND id IN (…), as the MySQL/MariaDB DAO already does in FreshRSS_EntryDAO::markRead().
FreshRSS version
1.30.4 (code unchanged on edge)
System info
PostgreSQL 17 (managed), PHP 8.4, official Docker image. Also reproduced on SQLite (local file: 300 IDs in 1.48 s vs 0.01 s batched).
Activity
Alkarex commentedon Nov 17, 2026
Thanks for the PR! And you are welcome to directly submit a PR without first filing an issue
SQLite, PostgreSQL: batch markRead for lists of IDs (FreshRSS#9575)