运行pg_dumpall使集群“主”的备份,但我有另一个集群“自定义”。 我如何使pg_dumpall产生“自定义”的备份?
每个集群都由不同的Postgres实例提供服务,在不同的端口上侦听和/或使用不同的unix域套接字(如果在一台机器上运行不同的实例)。
所以你需要为端口传递不同的值:
-p port --port=port Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.