Added to TODO: * Add GUC log_statement_duration to print statement and >= min duration
--------------------------------------------------------------------------- Bruce Momjian wrote: > Tom Lane wrote: > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > One nice thing is that each element is orthoginal. But, for the > > > functionality desired, we have to merge log_statement and log_duration > > > and have it print for statements taking over X milliseconds. I have no > > > problem adding it, but it has to be clear it isn't orthoginal but is a > > > conditional combination of two other parameters. > > > > Actually, I was wondering if we shouldn't *replace* the current > > log_duration with a combined form (that specifies a minimum interesting > > duration). I can't quite see the need for orthogonality here. The > > only reason you'd care about query duration is that you're looking for > > the slow ones, no? So why bother logging the fast ones? Besides, you > > can specify min-duration zero if you really want 'em all. > > We did talk about this a while ago, and folks wanted the query printed > _before_ it was executed, so they could see the query in the logs at the > time it was issued, both for monitoring and for showing the time the > query started when log_timestamp is enabled. > > Seems the clearest option would be for log_duration to print the query > string too, and convert it to an integer field. I can see zero meaning > print all queries and durations. What value do we use to turn it off? > -1? > > This would give us log_statement that prints at query start, and > log_duration that prints query and duration at query end. How is that? > > Maybe we should rename them as log_statement_start and > log_statement_duration. > > -- > Bruce Momjian | http://candle.pha.pa.us > [EMAIL PROTECTED] | (610) 359-1001 > + If your life is a hard drive, | 13 Roberts Road > + Christ can be your backup. | Newtown Square, Pennsylvania 19073 > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] > -- Bruce Momjian | http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster