簡體   English   中英

如何在Heroku上訪問Postgresql部署的postgresql.conf文件

[英]How to access postgresql.conf file of postgresql deployment on Heroku

我在Heroku上托管了一個Django應用,並帶有一個Standard 0計划的PostgreSQL數據庫。 我想訪問並閱讀此特定應用程序的postgresql.conf文件(以確定/編輯設置)。 誰能指導我該怎么做?

注意:我無法通過Heroku儀表板執行此操作,並且我不知道如何通過Ubuntu命令行訪問應用程序的文件結構。

您可以列出所有當前設置,而無需訪問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
...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM