Project

General

Profile

Bug #16994

Weblate database switch to PostgreSQL

Added by hefee 7 months ago. Updated about 3 hours ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
04/01/2020
Due date:
04/01/2020
% Done:

0%

Feature Branch:
Type of work:
Sysadmin
Blueprint:
Starter:
Affected tool:
Translation Platform

Description

Upstream only wants to support PostgreSQL and kick out MySQL support. (see https://github.com/WeblateOrg/weblate/issues/2825, https://docs.weblate.org/en/latest/admin/install.html#database-setup)


Related issues

Related to Tails - Bug #16995: translate.lizard: cron.sh fail with 'Lock wait timeout exceeded; try restarting transaction' Resolved
Related to Tails - Bug #16943: Upgrade to Weblate 3.x Resolved
Related to Tails - Bug #17050: Translation platform: design & implement long-term maintenance & support plan In Progress
Related to Tails - Bug #17445: Weblate: tune VM resources and service config for better performance Confirmed

History

#1 Updated by hefee 7 months ago

Currently PostgrSQL is only recommend for new installation and existing users don't need to switch atm.

On the bugreport the have a link to a migration guide: https://www.calazan.com/migrating-django-app-from-mysql-to-postgresql/

#2 Updated by hefee 7 months ago

  • Related to Bug #16995: translate.lizard: cron.sh fail with 'Lock wait timeout exceeded; try restarting transaction' added

#3 Updated by intrigeri 7 months ago

  • Related to Bug #16943: Upgrade to Weblate 3.x added

#4 Updated by intrigeri 7 months ago

Upstream only wants to support PostgreSQL and kick out MySQL support. (see https://github.com/WeblateOrg/weblate/issues/2825

Interesting! I've subscribed to this upstream issue so we have a heads up wrt. upstream's decision.

#5 Updated by Anonymous 7 months ago

Sounds like a good (long-term) plan!

#6 Updated by intrigeri 7 months ago

  • Related to Bug #17050: Translation platform: design & implement long-term maintenance & support plan added

#7 Updated by zen 2 months ago

For the record, we're getting repeated mysql lock timeout errors in the Weblate log (#17445).

I am not sure, though, if only switching to PostgreSQL would immediatelly solve those issues as I'm not sure such performance improvements are already implemented in Weblate in the version we're currently running (3.5.1).

Anyway, I think the best combo to do right now would be (1) upgrade to latest Weblate (#17345), (2) switch to PostgreSQL (this issue), and (3) tune Weblate config and the VM resources to guarantee the service works as expected (#17445). This way we'd be ready to welcome new performance related features when they are available in upstream.

#8 Updated by zen 2 months ago

  • Related to Bug #17445: Weblate: tune VM resources and service config for better performance added

#9 Updated by zen about 1 month ago

  • Due date set to 03/20/2020
  • Start date set to 03/18/2020

#10 Updated by zen 6 days ago

  • Due date changed from 03/20/2020 to 04/01/2020
  • Start date changed from 03/18/2020 to 04/01/2020

Pandemic context made me had to do something else on the day I had organized to do this, so I'm rescheduling for April 1st 2020.

#11 Updated by zen about 3 hours ago

Here is upstream documentation on migrating the database: https://docs.weblate.org/en/weblate-3.11/admin/upgrade.html#database-migration

And these are the rough steps I'm planning to do:

  • Put Weblate under maintenance (to avoid modifications during the switch) -- probably modifying Nginx config.
  • Add PostgreSQL and a database configuration to Puppet codebase.
  • Add the new database configuration to Weblate config using Puppet.
  • Manually export/import the database.
  • Switch the database configuration in Weblate config using Puppet.
  • Remove Weblate from maintenance.
  • Remove the MariaDB database configuration from Weblate config in Puppet.

Also available in: Atom PDF