1

I'm new to Postgres so can't seem to change the logging setting.

At the moment it logs ALL queries that are executed by any application. The app writes millions of queries a day so the log files get too big. I only need it to log any errors.

How can I change that in Postgres? I've installed it using Homebrew on Mac OS X.

1

2 Answers 2

3

You need to configure in postgresql.conf(data/postgresql.conf) file

change the setting in log_statement = 'all' to get the desired value which is available in When To Log

see this SO question for more info.

Sign up to request clarification or add additional context in comments.

2 Comments

My configuration already seems to be set to log_statement='none' yet is still logging all queries.
just go through stackoverflow.com/questions/722221/… you'll get more details about logging
0

@jacob You can restart the postgresql service by sudo /etc/init.d/postgresql restart or sudo service postgresql restart.

2 Comments

This should be a comment
Sorry @ρяσѕρєяK I am new to here. So i did't have a permission to add a comments in others answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.