Book Image

PostgreSQL 9 Administration Cookbook - Second Edition

Book Image

PostgreSQL 9 Administration Cookbook - Second Edition

Overview of this book

Table of Contents (19 chapters)
PostgreSQL 9 Administration Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Starting the database server manually


Typically, the PostgreSQL server will start automatically when the system boots. You may have opted to stop and start the server manually, or you may need to start up or shut down for various operational reasons.

Getting ready

First, you need to understand the difference between the service and the server. The word "server" refers to the database server and its processes. The word "service" refers to the operating system wrapper by which the server gets called. The server works in essentially the same way on every platform, whereas each operating system and distribution has its own concept of a service.

How to do it…

On all platforms, there is a specific command to start the server:

  • Here is the command for Ubuntu and Debian:

    pg_ctlcluster 9.4 main start
    
  • For Red Hat/Fedora, the command is as follows:

    pg_ctl -D /var/lib/pgsql/data start
    
  • For Solaris, this is the command:

    pg_ctl -D /var/lib/pgsql/data start
    
  • For Mac OS, the command is as follows:

    pg_ctl -D /var...