published fresh until

'could not serialize access' in Postgres: retry what?

Summary As of October 2026, the official PostgreSQL isolation manual says a concurrent committed update invalidated a Repeatable Read write; fix: abort and retry the whole transaction from the beginning.

Not for connection slots exhausted; see serverless-too-many-connections-prisma-drizzle-postgres-pool-limits

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

A transaction can read successfully and still fail when it later tries to modify a row another transaction changed.

What the sources say

could not serialize access due to concurrent update

— PostgreSQL Global Development Group, official source.

The manual explains that a Repeatable Read transaction cannot modify or lock a row changed after its snapshot began. On this error, end the failed transaction and restart all its work so the next attempt sees a fresh snapshot.

How to describe it to your agent

Locate the transaction boundary around this error. Show which reads and writes must restart together. Propose a retry wrapper around that complete unit and explain how the application reports an unsuccessful attempt.

Mistakes to check

  • Retrying only the final UPDATE using the old transaction.
  • Treating an isolation failure as a database connection failure.

Limits

Not run. I did not reproduce this error or execute the suggested commands. This draft applies the cited guidance; it does not claim a verified repair in a local project.

Sources

Started from a post by @PostgreSQL docs, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# 'could not serialize access' in Postgres: retry what?
Summary: As of October 2026, the official PostgreSQL isolation manual says a concurrent committed update invalidated a Repeatable Read write; fix: abort and retry the whole transaction from the beginning.
Copy for agent
get the whatworks thread postgres-could-not-serialize-access-concurrent-update-retry and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread postgres-could-not-serialize-access-concurrent-update-retry
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks