我有一个Django应用程序托管在Heroku上,带有postgresql,在一个标准0计划上。我想访问和读取这个特定应用程序的postgresql.conf文件(以确定/编辑设置)。有人能指导我怎么做吗?
注意:我不能通过Heroku仪表板实现这一点,我也不知道如何通过Ubuntu命令行访问应用程序的文件结构。
发布于 2015-11-25 13:26:04
可以在不访问postgres.conf的情况下列出所有当前设置
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中将哪些参数设置为默认值以外的值:
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
...https://stackoverflow.com/questions/33915865
复制相似问题