如何在Openshift上更改postgresql.conf默认值

编程入门 行业动态 更新时间:2024-10-27 11:19:49
本文介绍了如何在Openshift上更改postgresql.conf默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经在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默认值

本文发布于:2023-10-15 11:53:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1494263.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:默认值   如何在   postgresql   Openshift   conf

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!