Previously, we set the locale to C using pg_createcluster's --locale option, which unintentionally also set the encoding to SQL_ASCII. We prefer UTF8 as the default encoding.
15 lines
434 B
Ruby
Executable file
15 lines
434 B
Ruby
Executable file
#!/bin/env ruby
|
|
# frozen_string_literal: true
|
|
|
|
require_relative "../../common/lib/util"
|
|
|
|
r "chown postgres /dat"
|
|
|
|
# Below commands are required for idempotency
|
|
r "rm -rf /dat/16"
|
|
r "rm -rf /etc/postgresql/16"
|
|
|
|
r "pg_createcluster 16 main --start --locale=C.UTF8"
|
|
|
|
r "sudo -u postgres psql -c 'CREATE ROLE ubi_replication WITH REPLICATION LOGIN'"
|
|
r "sudo -u postgres psql -c 'CREATE ROLE ubi_monitoring WITH LOGIN IN ROLE pg_monitor'"
|