我已经在OpenShift上运行CakePHP安装已有六个月了.数据库是PostgreSQL 9.2,我曾经通过shell设置 postgresql.conf 文件,编辑 postgresql/data/postgresql.conf (在 postgresql/conf/postgresql.conf 在数据库重新启动后没有保留更改),首次设置文件后一切正常,直到今天我git推送了一些更改,因此重新启动了应用程序数据库,并且应用程序向我显示与数据库日期样式相关的错误,验证 postgresql/data/postgresql.conf 文件是否已重置,我尝试更改默认配置,但是在重新启动应用程序后,被openshift覆盖为默认值.
I've been running a CakePHP installation on OpenShift for six months. The database is PostgreSQL 9.2, i used to setup the postgresql.conf file via shell, editing postgresql/data/postgresql.conf (there is another postgresql.conf file in postgresql/conf/postgresql.conf that didn't keep the changes after db restarts), after setting up the file for the first time everything was ok until today that i git pushed some changes, restarted the application hence the database, and the application was showing me errors related with database datestyle, verifiyng that the postgresql/data/postgresql.conffile was reset, i tried to change the default configuration but after restarting the application it was overwrited by openshift to its defaults.
我正在使用此git存储库进行设置 github/BanzaiMan/openshift-cakephp-example-postgresql
I'm using this git repository for the set up github/BanzaiMan/openshift-cakephp-example-postgresql
Openshift是否更改了配置 postgresql.conf 的方式?还有其他方法可以更改 postgresql.conf 默认值吗?
Did Openshift changed the way to configure postgresql.conf? Is there any other way to change postgresql.conf default values?
我需要更改
#------------------------------------------------------------------------------ # CLIENT CONNECTION DEFAULTS #------------------------------------------------------------------------------ # - Locale and Formatting - datestyle = 'iso, mdy' lc_messages = 'en_US.utf8' lc_monetary = 'en_US.utf8' lc_numeric = 'en_US.utf8' lc_time = 'en_US.utf8' default_text_search_config = 'pg_catalog.english'对此
datestyle = 'iso, dmy' lc_messages = 'es_BO.utf8' lc_monetary = 'es_BO.utf8' lc_numeric = 'es_BO.utf8' lc_time = 'es_BO.utf8' default_text_search_config = 'pg_catalog.english'更新
已报告此问题: bugzilla.redhat/show_bug.cgi?id = 1123587
推荐答案您不应直接编辑data/postresql.conf,因为在启动/重新启动应用程序后会重新生成此配置.
You should not edit the data/postresql.conf directly as this configuration is regenerated after application start/restart.
我添加了 OPENSHIFT_POSTGRESQL_LOCALE 环境变量,可用于更改默认语言环境.它应该在下一版的Online中可用.
I added OPENSHIFT_POSTGRESQL_LOCALE environment variable you can use to change the default locale. It should be available in the next release of Online.
github/openshift/origin-server/pull/5664
感谢您举报!如果您需要更多的配置调整,请打开一个错误:-)
Thanks for reporting this! If you need more configuration tweaking, please open an bug :-)
更多推荐
如何在Openshift上更改postgresql.conf默认值
发布评论