PostgreSQL Multi-instance run

Source: Internet
Author: User
Tags psql

Create a new instance, (the 9.1 version used below, if it is a different version, you can replace 9.1 with the version number)

sudo/usr/bin/Pg_createcluster

-U postgres # #系统用户

-D/VAR/LIB/POSTGRESQL/9.1/D1 # #实例目录, version

-S/VAR/RUN/PGD1 # #

--local ZH_CN. UTF-8

-E UTF8 #

-P 5433 #端口

--start--start-conf Auto 9.1 #默认加入到pg的启动服务, service PostgreSQL start-or-stop will start or close all instances

PgD1 #实例名字

After the instance is created,pg_lsclusters to view the newly created instance details

When using Psql to link an instance, psql-h/var/run/pgd1-p 5433 Specifies the database port path (-S line selection in Pg_createcluster ) and the port number.

Close or open the instance separately Pg_ctlcluster 9.1 pgD1 Start|stop|restart.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.