Create multiple Postgres instances on same machine

后端 未结 3 1590
借酒劲吻你
借酒劲吻你 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:42

    Steps to create New Server Instance on PostgreSQL 9.5

    1. On command prompt run:

      initdb -D Instance_Directory_path -U username -W
      

      (prompts for password)

    2. Once the new Instance Directory is created. Run command prompt as Administrator

      pg_ctl register -N service_name -D Instance_Directory_path -o "-p port_no"
      
    3. After the service is registered, start server

      pg_ctl start -D Instance_Directory_path -o "-p port_no"
      

提交回复
热议问题