Commit 268bfc08 authored by Sandro Knauß's avatar Sandro Knauß
Browse files

Fix(postgresql): Initialise database without locale en_US.UTF8 avalaible systemwide

Currently postgres rely on en_US.UTF8 locale to be available for the
current machine. But it is possible to to initialise the database
without this locale to be available.

BUG: #417721
parent dad3399c
Pipeline #33440 failed with stage
in 89 minutes and 28 seconds
......@@ -281,7 +281,9 @@ bool DbConfigPostgresql::runInitDb(const QString &newDbPath)
// call 'initdb --pgdata=/home/user/.local/share/akonadi/data_db'
return execute(mInitDbPath, { QStringLiteral("--pgdata=%1").arg(newDbPath),
QStringLiteral("--locale=en_US.UTF-8") /* TODO: check locale */ }) == 0;
QStringLiteral("--encoding=UTF8"),
QStringLiteral("--no-locale")
}) == 0;
}
namespace {
......@@ -468,7 +470,8 @@ bool DbConfigPostgresql::startInternalServer()
#endif
// call 'initdb --pgdata=/home/user/.local/share/akonadi/db_data'
execute(mInitDbPath, { QStringLiteral("--pgdata=%1").arg(mPgData),
QStringLiteral("--locale=en_US.UTF-8") // TODO: check locale
QStringLiteral("--encoding=UTF8"),
QStringLiteral("--no-locale")
});
} else {
const auto versions = checkPgVersion();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment