Also what if there are more than $page_size records with that 15 value?
More than page_size records with that value works fine - that's why the primary key is included as a tie-breaker.
Would the created_at be a better option than the primary key? That can’t be deleted or changed, and that would give you a stable secondary sort?
More than page_size records with that value works fine - that's why the primary key is included as a tie-breaker.