Setting CLIENT_MIN_MESSAGES dynamically...

From: "Eamonn Kent" <ekent(at)xsigo(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Setting CLIENT_MIN_MESSAGES dynamically...
Date: 2006-09-05 22:38:21
Message-ID: 9146E3EBBFBCC94D95F95A1C4065348A837AEF@exch01.xsigo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Miguel Arroz 2006-09-05 23:07:51 How to check if VACUUM operations are working?
Previous Message Tahir Tamba 2006-09-05 18:08:27 PG installation on WinXP