> > 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.


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?


Reply via email to