HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlModerate

PostgreSQL: Change log file location

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresqlfilelogchangelocation

Problem

How can I change the location of the log file in PostgreSQL? Can it be done without stopping the cluster?

Solution

re 1) See the chapter "Where to log" in the manual.

http://www.postgresql.org/docs/current/static/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHERE

You want to change the log_directory property.

re 2) No, you need to restart Postgres when you change this.

Context

StackExchange Database Administrators Q#5435, answer score: 12

Revisions (0)

No revisions yet.