Introduction to PostgreSQL server startup and Shutdown

Source: Internet
Author: User
1. Start the database server (posgres user): [postgres @ localhostbin] $ S-dopt? SQL =t; opt=sqllo

1. Start the database server (posgres user): [postgres @ localhost bin] $ postgres-D/opt/postgresql/data/gt;/opt/postgresql/lo

1. Start the database server (posgres user ):

  • [S @ localhost bin] $ postgres-D/opt/postgresql/data/>/opt/postgresql/log/pg_server.log 2> & 1 &
  • [1] 4508
  • Of course, if environment variables are set

  • PGDATA=/Opt/postgresql/data
  • Export PGDATA
  • You can use the pg_ctl tool to start:

    Because it has already been started, print "another server might be running ". In this case, view the log with the following information:

    Of course, the simplest startup method is:

    If you want to start PG when the operating system starts, you can add the following statement in the/etc/rc. d/rc. local file:

  • /Opt/postgresql/bin/pg_ctl start-l/opt/postgresql/log/pg_server.log-D/opt/postgresql/data
  • 2. Disable the server

    The simplest method:

    Similar to Oracle, different modes can also be used when it is disabled. The introduction is as follows:

    Example:

    The fastest way to disable the kill ipvs Process

    Note: The processes after postgre is started are as follows:

    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.