We need to add an ORDER BY clause; not doing so was causing different processes to show up sometimes. As mentioned in the PostgreSQL manual: > Because the order of the rows in the database table is unpredictable, > when you use the LIMIT clause, you should always use the ORDER BY > clause to control the order of rows. If you don’t do so, you will get > an unpredictable result set.