Postgresql – How to lock read access while creating a model in django?
We notice a lot of trouble within our django application, where we use get_or_create. model, created = SomeModel.objects.get_or_create(user=user, name=name, defaults={...}); if created: get_some_dimensions # SLOW as we call to third party model.dimension_values.set(created_dimensions) # Code here that depends on dimensions being…