• Topic
  • Discussion
  • UdaWikiWeb.WhereIsThePostgreSQLErrorLog(Last) -- Owiki? , 2016-08-19 15:01:32 Edit owiki 2016-08-19 15:01:32

    Where is the PostgreSQL error log?

    PostgreSQL writes error output to screen. To alter this behavior, logging must be setup in the postgresql.conf file. Use the following instructions to setup logging or identify pre-set error logs:

    1. Login to the machine that contains the PostgreSQL instance.
    2. su to the PostgreSQL user.
    3. Execute the .profile associated with the PostgreSQL user.
    4. cd into the database sub-directory of the PostgreSQL installation.
    5. vi the postgresql.conf file.
    6. Locate the log_destination parameter.
    7. Locate the log_directory parameter.
    8. Locate the log_filename parameter.

    The log_ destination should pass syslog, redirect_ stderr, or eventlog (Windows). If redirect_ stderr is used, the log_ directory and log_ filename will show the directory and filenames that contain the redirected error output.

    If log_ destination is false or stderr, errors are only written to screen. No logs are being created. Read the following documentation and implement logging as described:

    http://www.postgresql.org/docs/current/static/runtime-config-logging.htm


    Referenced by...