The Page That Slipped

An infinite-scroll feed pages with ORDER BY created_at DESC LIMIT 20 OFFSET n. Users report seeing the same post twice a few screens down, and occasionally a post they never saw at all. The effect is worst for users who scroll slowly through an active feed. What is happening?

A

The sort column has no index, so rows with equal timestamps come back in a different physical order on each query and the page boundary lands arbitrarily

B

Only deletions can misalign an offset window, so moderation removing posts mid-scroll explains the skips, and the duplicates must come from the client retrying a failed request

C

Rows arriving at the top shift the list, so the offset no longer names the same boundary; a keyset cursor on the last item's timestamp and id is stable

D

The read replica serving page two lags behind the primary, so the second page comes from an older snapshot; pinning the session to the primary removes the overlap