title: python & postgresql: reliably check for updates in a specific table
body: <p><strong>Situation:</strong> I have a live trading script which computes all sorts of stuff every x minutes in my main <code>thread</code> (<strong>Python</strong>). the order sending is performed through such <code>thread</code>. the reception and execution of such orders though is a different matter as I cannot allow x minutes to pass but I need them as soon as they come in. I initialized another <code>thread</code> to check for such data (execution) which is in a database table (<code>POSTGRES SQL</code>). </p>
  
  <p><strong>Problem(s):</strong> I cannot continuosly perform query every xx ms, get data from DB, compare table length, and then get the difference for a variety of reasons (not only guy to use such DB, perforamnce issues, etc). so I looked up some solutions and came up with this thread (<a href="https://dba.stackexchange.com/questions/58214/getting-last-modification-date-of-a-postgresql-database-table">https://dba.stackexchange.com/questions/58214/getting-last-modification-date-of-a-postgresql-database-table</a>) where basically the gist of it was that 
  <em>"There is no reliable, authorative record of the last modified time of a table".</em> </p>
  
  <p><strong>Question:</strong> what can I do about it, that is: getting near instantenuous responses from a <code>postgres sql</code> table without overloading the whole thing using <code>Python</code>?  </p>