title: Debugging slow Postgresql 9.3 COMMITs
body: <p>With slow query logging turned on, we see a lot of <code>COMMIT</code>s taking upwards of multiple seconds to complete on our production database. On investigation, these are generally simple transactions: fetch a row, <code>UPDATE</code> the row, <code>COMMIT</code>. The <code>SELECT</code>s and <code>UPDATE</code>s in these particular transactions aren't being logged as slow. Is there anything we can do, or tools that we can use, to figure out the reason for these slow commits? We're running on an SSD, and are streaming to a slave, if that makes a difference.</p>