CargoSense / fable

Your events have a story to tell
77 stars 9 forks source link

Discussion: Process managers can miss events in theory #22

Open benwilson512 opened 3 years ago

benwilson512 commented 3 years ago

Per a conversation with @vhf, event log readers that rely on new_events = select * from events where id > $last_event_id can miss events if the following scenario obtains:

https://gist.github.com/vhf/d11f24f8ab3bb46e35dc9ccef6784eee

Will followup with additional discussion.

benwilson512 commented 3 years ago

So after some further thought, maybe logical replication is the answer here. It would certainly solve the issue of missing inserts. Need to do some testing.

LostKobrakai commented 3 weeks ago

Leaving this here as a resource with possible solutions to the discussed problem: https://blog.sequinstream.com/postgres-sequences-can-commit-out-of-order/