PostgREST / PostgREST/postgrest

Concurrency control in multi-user environments

Open
#1,069 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
27.7k
Forks
1.2k
Avg merge
1d 9h
Merged PRs (30d)
54

Description

Dear PostgREST community

Is there an "idiomatic" way (meaning PostgREST principles) to handle concurrent updates in a multi-user environment? I.e., with PostgREST as "backend", having a frontend (say webapp) for users to retrieve, edit, and then store changes to entities (rows in tables). How would you handle two users attempting to edit the very same entity (row) concurrently, while maintaining integrity?

There are some suggestions over here: https://blog.4psa.com/rest-best-practices-managing-concurrent-updates/ - how would this translate to PostgREST?

How do you handle this in real world applications?

Sebastian

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository file, test, or entry point. Start with the linked concurrency guidance and compare its suggestions with PostgREST and PostgreSQL behavior; done would require a decided, project-specific approach or clearly documented implementation scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
backend-api-design, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.