background preloader

Postgres

Facebook Twitter

Installation

PostgreSQL start/stop. This chapter covers several topics associated with managing a PostgreSQL database system, including starting and stopping the PostgreSQL backend, initializing the filesystem, and the creation, removal, and maintenance of individual databases.

PostgreSQL start/stop

There is also a section devoted to the topic of backing up and restoring data from a database. In this section we cover two options provided with PostgreSQL that are used to start and stop PostgreSQL. The first is a general purpose application called pg_ctl, which should function identically on any machine, regardless of the system. This script is intended to be run by the system user (e.g., the user who owns the data directory) configured to execute the postmaster backend.

The second script provided is the SysV-style script, found in the contrib/start-scripts subdirectory within the PostgreSQL source path. Force Postgres to Shutdown. Posted by alex in Errors at 12:07 PM You might see the following when issuing the normal stop command to postgres via pg_ctl.

Force Postgres to Shutdown

-bash-3.1$ pg_ctl stop waiting for server to shut down……………………………………………………… failed pg_ctl: server does not shut down Sometimes postgres does not want to shutdown by just issuing a pg_ctl stop as the postgres user. User might feel the need to “kill -9″ the postgres processes however this could be dangerous for PostgreSQL. How to log Postgres SQL queries?