====================
The tool is here https://github.com/hrk/tt-rss-mysql2pgsql
Download the contents of the dist directory, edit config.properties w/ the right values, launch the jar. Three (or five) errors you can ignore, and then you're done. More docs at the link.
====================
After hearing of PGSQL's marvelous performance, I'd like to migrate my existing tt-rss installation to PG, and I'd like to keep everything (users, articles, feeds, categories, ...)
I wrote a tool (you can have a laugh at me here if you want) which basically did a SELECT * FROM every table in the order they are created in the ttrss_schema_pgsql.sql file. For every row, it built a INSERT INTO (...).
The procedure completed without errors (except for the already existing admin user and the tt-rss feeds which are created in the schema script itself). I could log in without issues (using the default password for the admin user) and everything seemed to work. However when I started the update daemon I got the following errors in the log:
Code: Select all
[13:35:22/5712] Scheduled 49 feeds to update...
[13:35:22/5712] Base feed: http://feeds.feedburner.com/Androidlab
[13:35:22/5712] => 2013-05-26 11:10:12, 48 1
PHP Warning: pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/httpd/roma.sineo.it/htdocs/tt-rss/classes/db/pgsql.php on line 38
PHP Fatal error: Query INSERT INTO ttrss_error_log
(errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES
(2, 'pg_query(): Query failed: ERROR: duplicate key value violates unique constraint "ttrss_entries_pkey"
DETAIL: Key (id)=(3) already exists.', 'classes/db/pgsql.php', '38', '', NULL, NOW()) failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/httpd/roma.sineo.it/htdocs/tt-rss/classes/db/pgsql.php on line 43
PHP Warning: pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/httpd/roma.sineo.it/htdocs/tt-rss/classes/db/pgsql.php on line 38
PHP Fatal error: Query INSERT INTO ttrss_error_log
(errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES
(256, 'Query INSERT INTO ttrss_error_log
(errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES
(2, ''pg_query(): Query failed: ERROR: duplicate key value violates unique constraint "ttrss_entries_pkey"
DETAIL: Key (id)=(3) already exists.'', ''classes/db/pgsql.php'', ''38'', '''', NULL, NOW()) failed: ERROR: current transaction is aborted, commands ignored until end of transaction block', 'classes/db/pgsql.php', '43', '', NULL, NOW()) failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/httpd/roma.sineo.it/htdocs/tt-rss/classes/db/pgsql.php on line 43
[13:35:24/5709] removing lockfile (5709)...
[13:35:24/5516] [reap_children] child 5709 reaped.
[13:35:24/5516] [SIGCHLD] jobs left: 0
I am not very familiar with PGSQL, I wonder if it's related to its internal sequencies or if it is something stupid on my part. Is there another way to migrate an installation to PGSQL without starting from scratch?