Re: log_duration

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: log_duration
Date: 2003-02-12 23:57:42
Message-ID: 87adh1m4qx.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > One option is to have log_query output an identifier with the query such as a
> > hash of the query or the pointer value for the plan, suppressing duplicates.
> > Then log_duration prints the identifier with the duration.

> Actually, log_pid is the proper way to do this. You can then add log
> connections, and get a full snapshot of what is happening for that
> session.

Personally I would prefer a unique identifier. I guess the best way of
illustrating my intuition would be: "Imagine loading all this data into a
relational database, what would you need to full normalize it?".

Parsing log files programmatically is much easier if you have unique
identifiers instead of having to rely on the relative relationships of entries
in the log.

Not a big deal though, since I doubt anyone's actually parsing postgres logs.
Hm, brings up an interesting idea though, I wonder if it would be useful to
log directly into postgres tables.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sumaira Ali 2003-02-13 00:19:29 lock method
Previous Message Peter Eisentraut 2003-02-12 23:52:25 Re: [HACKERS] Changing the default configuration (was Re: