HomeSoftware Heritage

Fix changing default encoding

Description

Fix changing default encoding

Starting with 79fa35591e099a7b6981b873b930b943e5dc1827 it is not
possible to set a custom encoding on systems where initdb is not needed
(e.g. Debian). The autorequire introduce a circular dependency:

dependency cycles found: (Anchor[postgresql::server::service::begin] =>
                          Postgresql_psql[Set template1 encoding to UTF-8] =>
                          Class[Postgresql::Server::Initdb] =>
                          Postgresql_conf[listen_addresses] =>
                          Class[Postgresql::Server::Service] =>
                          Anchor[postgresql::server::service::begin])

Move the relevant code from postgresql::server::initdb to
postgresql::server::late_initdb and include it when applicable so that
the postgresql_psql command gets run after the service has started up.

Details

Provenance
Romain Tartière <romain@blogreen.org>Authored on Sep 8 2021, 4:11 AM
olasdPushed on Dec 28 2021, 10:47 AM
Parents
rSPPGecc63f1ac57d: Merge pull request #1295 from puppetlabs/release-prep
Branches
Unknown
Tags
Unknown

Event Timeline

Romain Tartière <romain@blogreen.org> committed rSPPG16dbd14749e7: Fix changing default encoding (authored by Romain Tartière <romain@blogreen.org>).Sep 8 2021, 9:42 AM