Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are Postgresql 9.1 logs? (not starting on FreeBSD 10)

I tried finding solutions, but nothing helps.

I need to do a backup of my pgsql data from the app, I haven't used for months now. I have discovered, that the postgresql server is not running. But cannot start it.

I run pg_ctl -D /usr/local/pgsql/data -l logging.log -w -s start as pgsql user (su pgsql). Output says that it couldn't start a server and tells me to check logs. But logging.log is an empty file. Any default logging file I have found on the web about is modified months ago or empty or even doesn't exist.

I have no idea how to find the error, since logs are empty or I just don't know where to look for them.

Important note: it was working few months ago, but there were almost no changes in that time (possible hostname change).

  • Postgres is v9.1
  • System: FreeBSD 10.0-RC4
like image 379
Janusz 'Ivellios' Kamieński Avatar asked Dec 09 '14 18:12

Janusz 'Ivellios' Kamieński


1 Answers

Some versions of FreeBSD ports installed PostgreSQL with syslog logging enabled. You can confirm this by looking at /usr/local/pgsql/data/postgresql.conf for log_destination = 'syslog'

If that is the case, the logging output should be visible in /var/log/messages

like image 72
Lucas Holt Avatar answered Sep 19 '22 00:09

Lucas Holt