jackc / jackc/pgx

how to understand what kind of error returned by Query

Open
#2,587 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
14.3k
Forks
1.1k
Avg merge
6d 9h
Merged PRs (30d)
11

Description

Hi!, i'm using pgx with yandex ha-sql library and create something like automatic retry for failed statements (internally all my queries are idempotent).
But for some reasons error may not mean network error, or postgresql server error like conflict with recovery.

So does it possible to understand what error belongs to group and retry only needed group of errors (not i have ugly thing like check for context errors and some network errors)

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

Start by reviewing pgx's Query error handling and the PostgreSQL error information available to callers, then compare that with the retry groups described in the issue. Done means documenting how to distinguish network, server, and retryable errors, or clearly identifying what information is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
backend, databases
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.