by vivzkestrel · 2y ago · 0 comments
create an index on both the pubdate (timestamptz column with potential duplicates like your post mentions) and a uuid primary key column (id in my case) problem solved
1. If the clock moves backwards (and an "older" record gets created), it doesn't help.
2. If a duplicate timestamp is created with an id that sorts earlier than one of the other dups (and a user has already synced to the first dup).
In both of those cases, the user won't receive the new record. (Yes, neither is probable, but neither is impossible.)