On 2/19/07, Greg Smith <[EMAIL PROTECTED]> wrote:
log_destination = 'stderr,sql' # Valid values are combinations of # stderr, syslog, sql, and eventlog, # depending on platform.
+1
# These are relevant when logging to sql: log_sql_table = 'pg_log' # Table SQL formatted logs INSERT into # Default is 'pg_log'
Is there really a need for that? Why not simply put something like %log_table% in the sql file and let the admin replace it with sed or whatever he likes? And it could allow us to move to copy without having to drop the code added to manage the new GUC variable.
I personally would just ignore the duration two entries per statement problem and make that the log analyzer software's job to fix, but I'm likely biased here because I don't ever do anything with that data.
We have basically 4 different cases: * log_min_duration_statement = 0: every query is logged with the duration on the same line, * log_statement = all: we don't have any duration, * log_statement = all & log_duration = on: we have every query and the duration on another line, * log_min_duration_statement = n > 0 & log_duration = on: we have duration lines for every query and statement + duration if the query is slower than n ms. There are other variants but I think they are the main cases to deal with. -- Guillaume ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly