Hi,
My config file has the following setting:
log_min_messages = fatal
This setting assures that postgres logging is minimal. However, I would like to change this setting dynamically – while our embedded application is running, without restarting postgres. For example, in the case where the application appears to be running sluggishly, I would like to change this setting to debug1 so that I can collect detailed information. The problem is the SET command applies only to the current session:
set log_min_messages='debug1';
Is there a way to accomplish this?
Currently, we have postgres generate a lot of debug messages (debug1) and then have syslog filter the messages as required. This works since I can edit the syslog.conf and restart syslog independent of our application. This is a less than ideal situation since we normally don’t want postgres producing lots of log data (wasting cpu) since we require it only when doing debugging.
Thanks
Ike