Web hosting compare - CHAPTER 26 POSTGRESQL ADMINISTRATION 595 Table 26-2.

CHAPTER 26 POSTGRESQL ADMINISTRATION 595 Table 26-2. pg_ctl Options Option Explanation U On Windows, specifies the username for the user to start the service. P On Windows, specifies the password for the user to start the service. Since there are a number of command modes and options, there are bound to be some cases that do not apply to your situation. However, let s take a closer look at some common examples to better show how the command syntax comes together. The following command starts PostgreSQL, waiting for the server to complete startup before returning, and logging any output to the file called my_log: pg_ctl -w -l my_log start The following is the most aggressive of the three ways to stop PostgreSQL using pg_ctl: pg_ctl stop -m immediate The different stop modes work as follows: Smart mode: The default stop mode; it waits for all clients to disconnect and then shuts down the server. Fast mode: Causes all active transactions to be rolled back, forcibly disconnects any client connections, and then shuts down the server. Immediate mode: Simply aborts all active server processes before shutting down. Since this is not a clean shutdown, the server goes through a recovery run upon restart. In general, it is best to attempt to stop PostgreSQL with the least forcible stop mode, and then increase its aggressiveness if needed. The following command would restart the PostgreSQL server, making it run on port 5480 after restart: pg_ctl -o “port=5480″ restart The following command causes the database initialized in /var/lib/pgsql/data to reread its configuration files. This is a commonly executed command when changing configuration settings in the postgresql.conf or pg_hba.conf files. pg_ctl -D /var/lib/pgsql/data reload Operating System Commands Many operating systems (OSs) have their own ways to start and stop a PostgreSQL server. Usually, these options are created by packages for that specific operating system. Since those options are platform-dependent, we won t go into the details of each of these methods. However, you should be aware that there may be another method for starting and stopping your server. Table 26-3 lists several operating systems and their alternative methods for starting the PostgreSQL server. For more details on these methods, please consult the documentation provided with either your OS or the package that installs PostgreSQL on your system.
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

Leave a Reply