Log query plan for timeout oopses
Bug #604509 reported by
Jeroen T. Vermeulen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Stuart Bishop |
Bug Description
For timeout oopses with long queries in them, I think it would be helpful to run an EXPLAIN on the longest query, and show the query plan in the oops report. (Not an EXPLAIN ANALYZE; that would execute the query and cause lots of trouble).
On the one hand this would save us a step in reproducing slow queries. On the other, it will tell us something we've been wondering about mysterious timeouts that we can't reproduce: are we testing the same query plan that applied at the time and it sometimes behaves unpredictably, or has it changed? So far we've been guessing.
(For merely repetitive queries this information isn't interesting).
affects: | launchpad → launchpad-foundations |
summary: |
- Log EXPLAIN timeout oopses + Log query plan for timeout oopses |
Changed in launchpad-foundations: | |
status: | New → Incomplete |
To post a comment you must log in.
I assume/hope EXPLAIN is very very fast, so it's probably no problem to do this, other than prioritization to find time to do it. However, I'm not clear on when this is useful.
This is for a case in which we have rare timeouts, I guess? If the timeout is frequent, then presumably an EXPLAIN on the production (or maybe even staging?) database will be sufficient, I would think. So, this is only helpful for rare timeouts? ...because when you run EXPLAIN on the production database later, it doesn't seem to be a problem any more?