title: PostgreSQL statement timeout
body: <p>PostgreSQL Version: 9.3</p>
  
  <p>We have online system which gets transnational data (approximately 15000 records per day).  </p>
  
  <p>We have table partitioning on date &amp; time and have a PostgreSQL function to load the incoming request into the table.</p>
  
  <p>Sometimes we see the error message</p>
  
  <blockquote>
    <p>ERROR: 57014: canceling statement due to statement timeout</p>
  </blockquote>
  
  <p>The client sends the request again after some time if not successful and on second try it gets recorded successfully.  It seems this has to be something with table locks but I am not sure.</p>