本文介绍了如何在 Heroku 上访问 postgresql 部署的 postgresql.conf 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个在 Heroku 上托管的 Django 应用程序,带有一个 postgresql 数据库,在 Standard 0 计划中.我想访问和阅读这个特定应用程序的 postgresql.conf 文件(以确定/编辑设置).谁能指导我如何做到这一点?
I have a Django app hosted on Heroku, with a postgresql DB, on a Standard 0 plan. I want to access and read the postgresql.conf file for this particular app (to ascertain/edit the settings). Can anyone guide me how to do that?
注意:我无法通过 Heroku 仪表板执行此操作,而且我不知道如何通过 Ubuntu 命令行访问应用程序的文件结构.
推荐答案您无需访问 postgres.conf 即可列出所有当前设置:
You can list all current settings without an access to 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 中将哪些参数设置为默认值以外的值:
You can also check which parameters are set in postgres.conf to values other than default:
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 ...更多推荐
如何在 Heroku 上访问 postgresql 部署的 postgresql.conf 文件
发布评论