4 ms·
https://github.com/shrinerb/shrine/discussions/665 https://github.com/shrinerb/shrine/discussions/665 I've never personally encountered this, but I've seen oth
by 999900000999 2y ago
https://github.com/shrinerb/shrine/discussions/665 https://github.com/shrinerb/shrine/discussions/665
I've never personally encountered this, but I've seen other HN contributors mention it.
https://news.ycombinator.com/item?id=43189535 https://news.ycombinator.com/item?id=43189535
From what I can tell, unlike mongo, some postgres queries will try to update the entire JSONB data object vs a single field. This can lead to race conditions.
- throwaway7783 2y agoAh, thanks. The first link seems something specific to Shrine. The bottomline is concurrent updates to different parts of JSONB need row level locking for correct behavior in Postgresql. This is not an important issue for us. Thank you for the pointers
- ahoka 2y agoYou can trivially do it without locking using a version column.