Re: log_duration - Mailing list pgsql-hackers

From Greg Stark
Subject Re: log_duration
Date
Msg-id 87adh1m4qx.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: log_duration  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: log_duration  (Kevin Brown <kevin@sysexperts.com>)
List 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



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Changing the default configuration (was Re: [pgsql-advocacy]
Next
From: "Sumaira Ali"
Date:
Subject: lock method