Tiny Tiny RSS - might drop support for MySQL
-
The author of Tiny Tiny RSS considers to drop MySQL / MariaDB support (https://discourse.tt-rss.org/t/feed-browser-do-you-use-it/2093/10) after weird errrors in the last update (in any event, a lot of commits again, so please update the cloudron package...).
I love his statement here
:
mysql is irredeemable shit garbage
whoever developed this pile of fuck should rot in hell for crimes against principles of ACID
https://dev.mysql.com/doc/refman/5.7/en/cannot-roll-back.html
god i wish i could fucking roll back support for mysql from tt-rssMay I suggest - once again - to switch Tiny Tiny RSS to PostgreSQL, as recommended by the author, anyway? We're using it e.g. for Nextcloud, anyway.
Since converting MySQL to PostgreSQL does not seem doable Maybe you could offer a "second" TT-RSS version with PostgreSQL for existing TT-RSS users and let people migrate...
-
Digging the forum further:
- It seem OPML is the way to migrate - https://community.tt-rss.org/t/upgrade-path-from-a-very-old-version/5081/2 . This might be a bit lossy though.
- MySQL support flakiness - https://community.tt-rss.org/t/looks-like-mysql-in-tt-rss-is-over-upd-or-is-it/4368 and https://community.tt-rss.org/t/errors-on-edit-feed-and-edit-filter-dialogs/4365 .
So, any opposition for just creating a new TTRSS package with Postgres and deprecate the current one?
-
I think he followed up with https://discourse.tt-rss.org/t/failed-updating-to-version-136/2096/24 saying it's unlikely.
Maintaining two version of ttrss is probably going to a bit too much work for us atm especially because the mysql version works just fine (I use it everyday myself).
I think in the long run, if they do decide to move away, we will do an OPML based transition (hopefully Cloudron can do this transparently as well).
We will update the app
We want to move fast but not way too fast, for example, rolling back the schema changes in the post you linked for example would be a lot of work with little gain if we had moved too fast.
-
Dropping or not the MySQL I wonder why Cloudron Team choose MySQL over PostgreSQL when this one is available.
Example why Nextcloud is with PostgreSQL but not TT-RSS?
But more concrete, in the case of TT-RSS with PostgreSQL it would be possible to mark similar articles as read (requires pg_trgm) == plugin: af_psql_trgm
-
Isn't there an export/import util for TTRSS?
I know of other products that act as smart gateways for DBs and can auto translate queries from one type to another, which can then be used to 'walk' the index across.
@robi said in Tiny Tiny RSS - might drop support for MySQL:
Isn't there an export/import util for TTRSS?
There's an import/export plugin to keep starred / archived articles, but even with that and / or OPML export / import, you lose the read / unread status of articles and content that is not online anymore.
See discussions here: https://community.tt-rss.org/t/migration-from-mysql-to-postgresql/
This seems to be abandoned: https://github.com/hrk/tt-rss-mysql2pgsql -
@robi said in Tiny Tiny RSS - might drop support for MySQL:
Isn't there an export/import util for TTRSS?
There's an import/export plugin to keep starred / archived articles, but even with that and / or OPML export / import, you lose the read / unread status of articles and content that is not online anymore.
See discussions here: https://community.tt-rss.org/t/migration-from-mysql-to-postgresql/
This seems to be abandoned: https://github.com/hrk/tt-rss-mysql2pgsqlApparently someone found a way in a newer thread: https://community.tt-rss.org/t/migrating-from-mysql-to-postgresql-different-server-versions/3623/20
# OPML import/export (including filters and some settings). Must be done before data_migration plugin if you want to keep feed categories # on the original machine sudo mkdir /var/www/tt-rss/export sudo chown -R www-data:www-data /var/www/tt-rss/export/ sudo -u www-data php /var/www/tt-rss/update.php --opml-export "MYUSERNAME /var/www/tt-rss/export/export-2020-08-07.opml" # export feeds OPML # on a client rsync -avP my.original.machine.org:/var/www/tt-rss/export/export-2020-08-07.opml ./ # download opml export # login to the new tt-rss instance from a browser, go to Preferences > Feeds, import OPML file # migrate all articles from mysql to postgresql # on the original machine git clone https://git.tt-rss.org/fox/ttrss-data-migration sudo chown -R root:www-data ttrss-data-migration/ sudo mv ttrss-data-migration/ /var/www/tt-rss/plugins.local/data_migration sudo nano /var/www/tt-rss/config.php # enable data_migration in the PLUGINS array sudo -u www-data php /var/www/tt-rss/update.php --data_user MYUSERNAME --data_export /var/www/tt-rss/export/export-2020-08-07.zip # export articles to database-agnostic format # on the target machine git clone https://git.tt-rss.org/fox/ttrss-data-migration sudo chown -R root:www-data ttrss-data-migration/ sudo mv ttrss-data-migration/ /var/www/rss.example.org/plugins.local/data_migration sudo nano /var/www/rss.example.org/config.php # enable data_migration in the PLUGINS array rsync -avP my.original.machine.org:/var/www/tt-rss/export/export-2020-08-07.zip ./ sudo mkdir /var/www/rss.example.org/export sudo mv export-2020-08-07.zip /var/www/rss.example.org/export sudo chown -R root:www-data /var/www/rss.example.org/export sudo chmod -R g+rX /var/www/rss.example.org/export/ sudo -u www-data php /var/www/rss.example.org/update.php --data_user MYUSERNAME --data_import /var/www/rss.example.org/export/export-2020-08-07.zip # it can take a while sudo rm -r /var/www/rss.example.org/export/ # cleanup
Also see https://community.tt-rss.org/t/moving-to-docker-with-external-mysql-db/4474/8
-
Dropping or not the MySQL I wonder why Cloudron Team choose MySQL over PostgreSQL when this one is available.
Example why Nextcloud is with PostgreSQL but not TT-RSS?
But more concrete, in the case of TT-RSS with PostgreSQL it would be possible to mark similar articles as read (requires pg_trgm) == plugin: af_psql_trgm
@JOduMonT said in Tiny Tiny RSS - might drop support for MySQL:
Dropping or not the MySQL I wonder why Cloudron Team choose MySQL over PostgreSQL when this one is available.
<rant> Speaking as a (self-hosted app) developer, providing multiple choices for databases is not a good idea to start with. But yet some apps go down that dangerous road. It just causes already small communities to split and bikeshed the virtues of each database to death. This is similar to nginx/apache etc. Should just pick one </rant>
Anyway, when we started, we just picked one. The upstream project had no preference and most PHP apps use MySQL for support in shared hosting environments.
But more concrete, in the case of TT-RSS with PostgreSQL it would be possible to mark similar articles as read (requires pg_trgm) == plugin: af_psql_trgm
That's a bummer....
I am open to creating a new package with PostgreSQL and deprecating the old one, if this is what upstream wants us to do. I think automatic migration from one database to another while possible is going to result in support tickets for us debugging ttrss database. Something which we are not experts at (and the upstream dev/forum is a frightening place
).
-
Apparently someone found a way in a newer thread: https://community.tt-rss.org/t/migrating-from-mysql-to-postgresql-different-server-versions/3623/20
# OPML import/export (including filters and some settings). Must be done before data_migration plugin if you want to keep feed categories # on the original machine sudo mkdir /var/www/tt-rss/export sudo chown -R www-data:www-data /var/www/tt-rss/export/ sudo -u www-data php /var/www/tt-rss/update.php --opml-export "MYUSERNAME /var/www/tt-rss/export/export-2020-08-07.opml" # export feeds OPML # on a client rsync -avP my.original.machine.org:/var/www/tt-rss/export/export-2020-08-07.opml ./ # download opml export # login to the new tt-rss instance from a browser, go to Preferences > Feeds, import OPML file # migrate all articles from mysql to postgresql # on the original machine git clone https://git.tt-rss.org/fox/ttrss-data-migration sudo chown -R root:www-data ttrss-data-migration/ sudo mv ttrss-data-migration/ /var/www/tt-rss/plugins.local/data_migration sudo nano /var/www/tt-rss/config.php # enable data_migration in the PLUGINS array sudo -u www-data php /var/www/tt-rss/update.php --data_user MYUSERNAME --data_export /var/www/tt-rss/export/export-2020-08-07.zip # export articles to database-agnostic format # on the target machine git clone https://git.tt-rss.org/fox/ttrss-data-migration sudo chown -R root:www-data ttrss-data-migration/ sudo mv ttrss-data-migration/ /var/www/rss.example.org/plugins.local/data_migration sudo nano /var/www/rss.example.org/config.php # enable data_migration in the PLUGINS array rsync -avP my.original.machine.org:/var/www/tt-rss/export/export-2020-08-07.zip ./ sudo mkdir /var/www/rss.example.org/export sudo mv export-2020-08-07.zip /var/www/rss.example.org/export sudo chown -R root:www-data /var/www/rss.example.org/export sudo chmod -R g+rX /var/www/rss.example.org/export/ sudo -u www-data php /var/www/rss.example.org/update.php --data_user MYUSERNAME --data_import /var/www/rss.example.org/export/export-2020-08-07.zip # it can take a while sudo rm -r /var/www/rss.example.org/export/ # cleanup
Also see https://community.tt-rss.org/t/moving-to-docker-with-external-mysql-db/4474/8
@necrevistonnezr Do you happen to know what's the latest on MySQL support ? https://community.tt-rss.org/t/failed-updating-to-version-136/2096/24 atleast says "it won't happen" .
I can't find any db preference info in https://tt-rss.org/wiki/InstallationNotes atleast (many links there are broken). https://tt-rss.org/wiki/InstallationNotesHost says anything is OK but the document itself is deprecated.
-
Digging the forum further:
- It seem OPML is the way to migrate - https://community.tt-rss.org/t/upgrade-path-from-a-very-old-version/5081/2 . This might be a bit lossy though.
- MySQL support flakiness - https://community.tt-rss.org/t/looks-like-mysql-in-tt-rss-is-over-upd-or-is-it/4368 and https://community.tt-rss.org/t/errors-on-edit-feed-and-edit-filter-dialogs/4365 .
So, any opposition for just creating a new TTRSS package with Postgres and deprecate the current one?
-
N necrevistonnezr has marked this topic as solved on
-
Digging the forum further:
- It seem OPML is the way to migrate - https://community.tt-rss.org/t/upgrade-path-from-a-very-old-version/5081/2 . This might be a bit lossy though.
- MySQL support flakiness - https://community.tt-rss.org/t/looks-like-mysql-in-tt-rss-is-over-upd-or-is-it/4368 and https://community.tt-rss.org/t/errors-on-edit-feed-and-edit-filter-dialogs/4365 .
So, any opposition for just creating a new TTRSS package with Postgres and deprecate the current one?
@girish Not from me…
-
We've released a new package with a new appstore id for the postgresql version of tinytinyrss. This is a whole new package, so automatic updates will not migrate to postgres, as there is no good way to automatically migrate.
We've written the steps to migrate over via OPML at https://docs.cloudron.io/apps/tinytinyrss/#migrating-from-mysql-to-postgresql
-
My suggestion is to include migrating steps for your plugins as well! If people forget, they might need to reconfigure their plugins (incl. Fever to connect to a whole bunch of apps) as well....
-
After reimporting the OPML (mind you: including settings), none of my feeds update anymore:
Update process failed with exit code: 110 ()
-
Could be the - built-in! - plugin
af_psql_trgm: Marks similar articles as read (requires pg_trgm)
:Apr 22 14:31:51 [14:31:51/8] Base feed: https://roundcube.net/feeds/atom.xml Apr 22 14:31:51 [14:31:51/8] => Roundcube Webmail Project News (ID: 71, U: kdj [2]), last updated: never Apr 22 14:31:51 [14:31:51/164] Lock: update_daemon-feed-71.lock Apr 22 14:31:52 PHP Warning: PDOException: SQLSTATE[42883]: Undefined function: 7 ERROR: function "similarity" does not exist Apr 22 14:31:52 LINE 1: select 'similarity'::regproc Apr 22 14:31:52 ^ in /app/code/plugins/af_psql_trgm/init.php:287 Apr 22 14:31:52 Stack trace: Apr 22 14:31:52 #0 /app/code/plugins/af_psql_trgm/init.php(287): PDO->query() Apr 22 14:31:52 #1 /app/code/classes/PluginHost.php(348): Af_Psql_Trgm->hook_article_filter() Apr 22 14:31:52 #2 /app/code/classes/RSSUtils.php(919): PluginHost->chain_hooks_callback() Apr 22 14:31:52 #3 /app/code/update.php(231): RSSUtils::update_rss_feed() Apr 22 14:31:52 #4 {main} in /app/code/classes/PluginHost.php on line 351 Apr 22 14:31:52 [14:31:52/164] Exception while updating feed 71: SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block (/app/code/classes/RSSUtils.php:1061) Apr 22 14:31:52 [14:31:52/8] <= 1.0067 (sec) exit code: 110 Apr 22 14:31:52 [14:31:52/8] !! Last error: Update process failed with exit code: 110 () Apr 22 14:31:52 PHP Notice: Update process for feed 71 (Roundcube Webmail Project News, owner UID: 2) failed with exit code: 110 (Update process failed with exit code: 110 ()). in /app/code/classes/Logger.php on line 50
-
Sure enough, after disabling the plugin, the feeds are populated...
So, we do have PostgreSQL but some function seems to be missing to use the similarity check: https://gitlab.tt-rss.org/tt-rss/tt-rss/-/blob/master/plugins/af_psql_trgm/init.php