How can I limit the PostgreSQL logging on the selected databases?
I have tried changing log-related parameters in pg_Settings
table but didn't succeed.
Asked
Active
Viewed 30 times
-1

Akhil S Kamath
- 1,012
- 13
- 23

Shalini Garg
- 1
- 1
1 Answers
2
You need to set the configuration parameter for each database
ALTER DATABASE your_database_name
SET log_statement = 'all';

Akhil S Kamath
- 1,012
- 13
- 23
-
Thanks for quick response, here you mean to set log_statement to none in postgreSQL conf file and set log_statement to "all" for the databases we want logging. is this understanding correct – Shalini Garg Aug 29 '17 at 07:54
-
@ShaliniGarg if your query has been solved,pls mark it as answer – Akhil S Kamath Aug 29 '17 at 07:55
-
@ShaliniGarg hope this link will be useful for further log related queries https://stackoverflow.com/questions/722221/how-to-log-postgresql-queries – Akhil S Kamath Aug 29 '17 at 08:04