Web server application - 594 CHAPTER 26 POSTGRESQL ADMINISTRATION buffer processing.
594 CHAPTER 26 POSTGRESQL ADMINISTRATION buffer processing. While you can call this postmaster executable process directly, the recommended way is to use the pg_ctl program. Using pg_ctl This program can be used for both starting and stopping PostgreSQL, and provides a number of options for doing so. First, take a look at Table 26-1, which lists and describes the different command types that can be involved with pg_ctl. Table 26-1. pg_ctl Command Modes Command Explanation start Starts a new postmaster process stop Stops a running postmaster process restart Stops a running postmaster and then starts it again reload Sends a signal to the postmaster to reload its configuration files status Determines if a postmasteris currently running kill Sends a specific signal to a specified process (new in PostgreSQL 8.0) register Allows you to register a system service on Windows platforms unregister Allows you to unregister a system service that was previously registered As you can see, the pg_ctl command is quite versatile for controlling your PostgreSQL database server. In addition to these command modes, pg_ctlalso takes a number of different options, which are listed and described in Table 26-2. Table 26-2. pg_ctl Options Option Explanation D datadir Specifies the location of the PostgreSQL database files. Defaults to whatever PGDATA is set to. l filename Logs server output to the file specified. Creates the file if it does not exist. m mode Specifies the shutdown mode (smart, fast, or immediate). o options Allows specific options to be passed directly to the postmaster process. p path Specifies the location of the postmaster executable. Defaults to the same directory as pg_ctl. s Specifies that no informational messages will be output, only errors. w Waits (up to 60 seconds) for the start or shutdown to complete. Defaults to shutdown. W Do not wait for start or shutdown to complete. Defaults to start and restart. N On Windows, specifies the name of the system service to register.
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.