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

编程入门 行业动态 更新时间:2024-10-27 19:26:24
本文介绍了如何在 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 文件

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

发布评论

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

>www.elefans.com

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