Red Hat Bugzilla – Bug 870056
altering template1 encoding on createdb
Last modified: 2014-10-30 18:34:16 EDT
Description of problem:
backup.sh and database scripts use template1 instead of template0
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Run create_db.sh or engine-db-install.sh
2.psql -U postgres -l
3.look for the locale info
Database creation scripts are using template1 database, this may result in a locale conflict when we are using UTF8 and the template 1 is configured with ASCII.
All database creation and handling scripts should use template 0
*** Bug 869275 has been marked as a duplicate of this bug. ***
fixed in commit: 9538658
reopening the bug
looks like the problem when using template0 is that it is blocks connections so we won't be able to install postgres extensions.
we have no choice but to use template1 and change the encoding.
Patch posted upstream
This is an alternative to the patch in comment #6. It makes it possible to use the template0 database as the extensions are created on the engine database once it is created:
Please review and let me know what you think.
An alternative patch to the patch in comment #7 is here:
fixed in commit: 6891171
3.2 beta built, moving to ON_QA status to allow testing