I appear to have a problem with pdo-experimental (I’ve recently changed the purge default from disabled to something more reasonable than ‘forever’ if it matters):
I will note, however, that running that command on master continues to say it’s Purged 1 orphaned posts even after repeating the command numerous times…
why not post in the main thread? where are the actual errors?
e: ffs i barely figured out that triangle thing
e2: check for SQL query errors either in system tab in preferences or your https log, without an actual database error it’s impossible to figure out what’s wrong.
the query in question hasn’t changed in any way so idk why it could fail. it works fine on both pgsql and mysql here.
anyway, this sounds like screwed up database (?), however it probably be a good idea to limit this query somehow. i have no idea if it’s possible to do delete … limit.
mysql> select count(*) FROM ttrss_entries WHERE NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id);
+----------+
| count(*) |
+----------+
| 146079 |
+----------+
1 row in set (0.87 sec)
mysql> DELETE FROM ttrss_entries WHERE NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id)
-> limit 10000;
Query OK, 10000 rows affected (2.94 sec)
mysql> DELETE FROM ttrss_entries WHERE NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id) limit 10000;
Query OK, 10000 rows affected (5.02 sec)
mysql> DELETE FROM ttrss_entries WHERE NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id) limit 10000;
Query OK, 10000 rows affected (7.52 sec)
[etc.]
Probable causes were a combination of
My setting Purge articles after ... to 300 when it was 0 to start with (been running for a few years.)
Deleting some old feeds that were now dead and returning errors.
i’ll add a reasonable limit to this query then, it makes sense anyway.
e: postgresql doesn’t like this syntax
mysql> DELETE FROM ttrss_entries WHERE id IN ( SELECT id FROM ttrss_entries WHERE NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id) LIMIT 5000)
-> ;
ERROR 1235 (42000): This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'