Skip to content

Commit

Permalink
Fixes #36030 - Ensure HStore is enabled
Browse files Browse the repository at this point in the history
Pulpcore 3.22 will start using HStore[1], which is in
postgresql-contrib. This ensures it's installed and enabled on the DB.
That needs to be done by a super user, so it can't be done in regular DB
migrations.

[1]: pulp/pulpcore#3427
  • Loading branch information
ekohl authored and evgeni committed Feb 16, 2023
1 parent 9dcc9df commit 2a5b8dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions manifests/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
if $pulpcore::postgresql_manage_db {
include postgresql::client
include postgresql::server
include postgresql::server::contrib
postgresql::server::db { $pulpcore::postgresql_db_name:
user => $pulpcore::postgresql_db_user,
password => postgresql::postgresql_password($pulpcore::user, $pulpcore::postgresql_db_password),
Expand All @@ -14,6 +15,12 @@
before => Pulpcore::Admin['migrate --noinput'],
}

postgresql::server::extension { "hstore for ${pulpcore::postgresql_db_name}":
database => $pulpcore::postgresql_db_name,
extension => 'hstore',
require => Class['postgresql::server::contrib'],
}

# pulpcore-content fails to reconnect to the database, so schedule a restart whenever the db changes
# see https://pulp.plan.io/issues/9276 for details
Class['postgresql::server::service'] ~> Service['pulpcore-content.service']
Expand Down

0 comments on commit 2a5b8dd

Please sign in to comment.