Where are the PostgreSQL logs on Mac OS X ?

Where are the PostgreSQL logs on Mac OS X ?

Asked on January 9, 2019 in PostgreSQL.
Add Comment


  • 2 Answer(s)

    In the mac OS X Homebrew installation the log can be found at:

    /usr/local/var/postgres/server.log
    

    Another one function

    /usr/local/var/log/postgres.log
    

    (First one is version < 9.6 and second one is version >= 9.6 of PostgreSQL)

    Answered on January 9, 2019.
    Add Comment

    Just execute this query

    SELECT
         *
    FROM
         pg_settings
    WHERE
         category IN( 'Reporting and Logging / Where to Log' , 'File Locations')
    ORDER BY
         category,
         name;
    

    In my case, it’s in “/Library/PostgreSQL/8.4/data/pg_log”

    Answered on January 9, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.