Log database backend pid
Bug #684669 reported by
Jeroen T. Vermeulen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Medium
|
Jeroen T. Vermeulen |
Bug Description
It'd be massively useful for debugging scripts if we would know what database backend processes were servicing them. We should log the backend PID when activating a store.
Stuart points at adapter.py as a good place to log this information. The backend PID is available as store._
ISTM get_backend_pid will just forward to libpq's PQgetBackendPID, so all it should do is query the PGconn structure. Barely any performance cost at all.
Related branches
lp:~jtv/launchpad/bug-684669
- Stuart Bishop (community): Approve (code)
- Brad Crittenden (community): Approve (code)
-
Diff: 99 lines (+11/-9)5 files modifiedlib/canonical/launchpad/webapp/adapter.py (+6/-0)
lib/lp/soyuz/doc/archive-override-check.txt (+1/-1)
lib/lp/soyuz/doc/soyuz-upload.txt (+1/-1)
lib/lp/translations/doc/poexport-request.txt (+1/-1)
lib/lp/translations/scripts/tests/test_reupload_translations.py (+2/-6)
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
Changed in launchpad: | |
milestone: | none → 11.01 |
To post a comment you must log in.
Stuart also recommends logging at level DEBUG2, along with commits and aborts.