Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Pagination is not compatible with UUID primary keys #3

Open
djmaze opened this issue Jun 23, 2015 · 0 comments
Open

Pagination is not compatible with UUID primary keys #3

djmaze opened this issue Jun 23, 2015 · 0 comments
Labels

Comments

@djmaze
Copy link

djmaze commented Jun 23, 2015

When using PostgreSQL and having a UUID type column as a primary key, the pagination might produce inconsistent results during dumping. UUIDs are not incrementing, but the pagination sorts by "id". That means when new records are inserted while the table is being dumped, they might appear randomly in pages, so pages might overlap. This leads to missing or duplicate records in the output.

The concerning code is at https://github.com/zweitag/yaml_db/blob/master/lib/serialization_helper.rb#L181.

@djmaze djmaze added the bug label Jun 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant