On 6 September 2010 23:57, Stuart Bishop <[email protected]> wrote: > On Mon, Sep 6, 2010 at 11:39 AM, Martin Pool <[email protected]> wrote: >> On 6 September 2010 13:45, Stuart Bishop <[email protected]> wrote: >>> We could turn on the logging for a single request. The problem is that >>> the output goes to the PostgreSQL logs, not somewhere we can easily >>> extract them. >> >> To judge from the documentation, we can tell it to send logs to the >> client (ie the web app) and then that could put them into either an >> oops or a comment at the end of a request or something else. > > Didn't realize that. Yes, we can get the output to the client. It is > in a particularly unreadable format so we would need to render it like > EXPLAIN does, and big so we certainly won't want to do this for all > requests, but it looks doable. I also notice we can inform the client > when it has waited for a lock longer than 1 second, which would be > cool to log.
Yay. Even a crude rendering is so much better than a possibly multi-day delay for people to try to recreate why their query is slow. I think if we just enable this on the server side we can have the client just turn this on only when ++dblog++ is on which should reduce the normal overhead (testing obviously needed). Can you try adding it? -- Martin _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp

