title: Strange ordering bug (is it a bug?) when ordering two columns with identical values
body: <p>I have the following query in postgres:</p>
  
  <pre><code>SELECT * 
  FROM "bookings"
  WHERE ("bookings".client_id = 50) 
  ORDER BY session_time DESC 
  LIMIT 20 OFFSET 0
  </code></pre>
  
  <p>The record in the 20th place is has an identical session_time to the 21st record. </p>
  
  <p>This query returns 20 results, however if you compare the results to the whole database the query returns the 1st-19th results and the 21st, skipping over the 20th.</p>
  
  <p>This query can be fixed by adding, "id" to the order:</p>
  
  <pre><code>SELECT * 
  FROM "bookings" 
  WHERE ("bookings".client_id = 50) 
  ORDER BY session_time DESC, id 
  LIMIT 20 OFFSET 0
  </code></pre>
  
  <p>However I was wondering how this bug occurred? How does postgres order identical filed when using offsets and limits? Is it random? Is it a bug with postgres?</p>