Reputation: 27
Queries of multiple schemas of DB are logged in the pg_log
directory in an application server, and the performance of specific schema needs to be profiled.
The same queries that are running, the difference is that search_path
is set to include different schemas in each case.
How to log queries using a specific in pg_log
? Or is there any way to "tail" specific the log for queries using a specific schema on the command line?
Upvotes: 0
Views: 359
Reputation: 246443
There is no way to do that.
What you could do is use different users to run the queries with different search_path
settings, and then only log queries by a certain user:
ALTER ROLE myuser SET log_min_duration_statement = 0;
Upvotes: 1