Where are the postgres logs?
·
Answer a question
I'm using DBeaver to connect the postgres db and want to access the logs via DBeaver.
I run the command below to find log destination and got stderr as the location.
show log_destination ;
How can I reach that file on DB app? FYI, I want all logs, not the logs that are from DBeaver.
Answers
On recent PostgreSQL versions, that is simple:
SELECT pg_current_logfile();
For old versions, proceed as follows:
-
Verify that the logging collector is started:
SHOW logging_collector;-
If not, the location of the log depends on how PostgreSQL was started.
-
If yes, the log will be in
log_directory:SHOW log_directory;If that is a relative path, it is relative to the PostgreSQL data directory.
-
Since the log file is on the database server, you probably won't be able to access it with a client tool.
更多推荐
所有评论(0)