Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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

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.



Ah, 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


You can trivially do it without locking using a version column.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: