远程重启 PostgreSQL

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6638741/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-20 23:08:01  来源:igfitidea点击:

Restart PostgreSQL Remotely

postgresqlpgadmin

提问by Dino

Can I remotely restart a PostgreSQL server throught PGAdmin ? The user I currently is the administrative privileges.

我可以通过 PGAdmin 远程重启 PostgreSQL 服务器吗?我当前的用户是管理权限。

Regards,

问候,

Dino

迪诺

采纳答案by Grzegorz Szpetkowski

I don't think there is such possibility. At best you can reloadconnected PostgreSQL server using pg_reload_conf()function:

我不认为有这种可能性。充其量您可以使用以下功能重新加载连接的 PostgreSQL 服务器pg_reload_conf()

pg_reload_conf sends a SIGHUP signal to the server, causing configuration files to be reloaded by all server processes.

pg_reload_conf 向服务器发送 SIGHUP 信号,导致所有服务器进程重新加载配置文件。

Command:

命令:

SELECT pg_reload_conf();

You can also install adminpack contrib moduleand reload server using Tools menu.

您还可以使用工具菜单安装adminpack contrib 模块和重新加载服务器。

EDIT:

编辑:

According to pgAdmin documentation:

根据 pgAdmin文档

If pgAdmin is running on a Windows machine, it can control the postmaster service if you have enough access rights. Enter the name of the service. In case of a remote server, it must be prepended by the machine name (e.g. PSE1\pgsql-8.0). pgAdmin will automatically discover services running on your local machine.

If pgAdmin is running on a Unix machine, it can control processes running on the local machine if you have enough access rights. Enter a full path and needed options to access the pg_ctl program. When executing service control functions, pgAdmin will append status/start/stop keywords to this. Example: sudo /usr/local/pgsql/bin/pg_ctl -D /data/pgsql

如果 pgAdmin 在 Windows 机器上运行,并且您有足够的访问权限,它可以控制 postmaster 服务。输入服务的名称。在远程服务器的情况下,它必须以机器名称(例如 PSE1\pgsql-8.0)作为前缀。pgAdmin 将自动发现在您的本地机器上运行的服务。

如果 pgAdmin 在 Unix 机器上运行,如果您有足够的访问权限,它可以控制在本地机器上运行的进程。输入完整路径和所需选项以访问 pg_ctl 程序。在执行服务控制功能时,pgAdmin 将在此附加 status/start/stop 关键字。示例:sudo /usr/local/pgsql/bin/pg_ctl -D /data/pgsql

You can try use Start Service/Stop Service options (in Tools menu) to restart remote server.

您可以尝试使用启动服务/停止服务选项(在工具菜单中)重新启动远程服务器。