首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Heroku上访问postgresql部署的postgresql.conf文件

如何在Heroku上访问postgresql部署的postgresql.conf文件
EN

Stack Overflow用户
提问于 2015-11-25 11:53:43
回答 1查看 2.6K关注 0票数 2

我有一个Django应用程序托管在Heroku上,带有postgresql,在一个标准0计划上。我想访问和读取这个特定应用程序的postgresql.conf文件(以确定/编辑设置)。有人能指导我怎么做吗?

注意:我不能通过Heroku仪表板实现这一点,我也不知道如何通过Ubuntu命令行访问应用程序的文件结构。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-11-25 13:26:04

可以在不访问postgres.conf的情况下列出所有当前设置

代码语言:javascript
复制
SELECT name, current_setting(name)
FROM pg_settings;

          name           |    current_setting    
-------------------------+-----------------------
 allow_system_table_mods | off
 application_name        | psql.bin
 archive_command         | (disabled)
 archive_mode            | off
 archive_timeout         | 0
...

还可以检查在postgres.conf中将哪些参数设置为默认值以外的值:

代码语言:javascript
复制
SELECT name, current_setting(name), sourcefile, sourceline
FROM pg_settings
WHERE sourcefile notnull;

            name            |  current_setting  |               sourcefile               | sourceline 
----------------------------+-------------------+----------------------------------------+------------
 DateStyle                  | ISO, DMY          | /opt/postgres/9.5/data/postgresql.conf |        538
 default_text_search_config | pg_catalog.simple | /opt/postgres/9.5/data/postgresql.conf |        560
 dynamic_shared_memory_type | posix             | /opt/postgres/9.5/data/postgresql.conf |        130
...
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33915865

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档