Create multiple Postgres instances on same machine

后端 未结 3 1620
借酒劲吻你
借酒劲吻你 2021-01-31 09:47

To test streaming replication, I would like to create a second Postgres instance on the same machine. The idea is that if it can be done on the test server, then it should be tr

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-31 10:24

    On Debian based distros you could use pg_createcluster instead of initdb:

    $ pg_createcluster -u [user] -g [group] -d /path/to/data -l /path/to/log -p 5433
    

    Also pg_ctlcluster is an alternative to pg_ctl.

提交回复
热议问题