Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Контракты ресурсов (fail-closed)

AngaraBase ограничивает ресурсы по принципу restrictive-by-default: при достижении границы запрос отклоняется (или отменяется) детерминированным SQLSTATE, а не деградирует молча. Логика повторов на клиенте и правила алертинга должны строиться по этой таблице.

Границы ресурсов

ГраницаSQLSTATEУсловиеПараметрМетрикаWait-event
Connection limit Stable53000insufficient_resourcesmax_connectionsangarabase_pgwire_pool_rejected_total
QoS admission (concurrent queries) Baseline53600qos_queue_fullangarabase_qos_rejected_critical_totalqos_queue
Per-transaction write set Baseline54023configuration_limit_exceededtxn.max_write_set_bytes
Buffer-pool / commit backpressure Baseline53400insufficient_resourcesbuffer_pool.backpressure.modeangarabase_buffer_pool_backpressure_events_totalbuffer_pool_eviction
Query memory limit Baseline53400insufficient_resourcesexecution.query_memory_limit_mb
Statement timeout Stable57014query_canceledstatement_timeout
Lock wait timeout Stable55P03lock_not_availablelock_timeoutangarabase_lock_timeout_total
Idle-in-transaction timeout Stable57P01idle_in_transaction_session_timeoutangarabase_idle_txn_killed_total
Snapshot too old (UNDO budget) Baseline72000snapshot_too_old
Disk full Stable53100disk_full

Поведение и реакция клиента

Connection limit — 53000

Reject the new connection once max_connections is reached; established sessions are unaffected.

Реакция клиента: Back off and retry; surface the signal to the connection pool / load balancer.

QoS admission (concurrent queries) — 53600

Reject when the per-ServiceLevel concurrency/queue cap is exceeded rather than queueing unboundedly.

Реакция клиента: Exponential back-off with jitter; lower-priority work is shed first. Distinct from 53000 so QoS rejects are safe to retry.

Per-transaction write set — 54023

Reject the DML once the per-transaction write set exceeds its byte/page budget; the transaction must roll back.

Реакция клиента: Roll back and retry with a smaller write batch, or raise txn.max_write_set_bytes / txn.max_write_set_pages.

Buffer-pool / commit backpressure — 53400

Park writers on buffer-pool eviction; once the uncommitted-pages / WAL-queue hard limit is hit, reject the commit with 53400 instead of unbounded buffering.

Реакция клиента: Reduce write batch size and retry after back-off; treat as a capacity signal for the operator. 53400 is transient (retryable).

Query memory limit — 53400

Spill operators (hash join, aggregation) to disk under memory pressure; reject with 53400 only when a spill partition cannot be admitted.

Реакция клиента: Reduce result/intermediate size (add predicates, lower batch size) or raise execution.query_memory_limit_mb.

Statement timeout — 57014

Cancel the running statement once statement_timeout elapses; partial results are discarded and the transaction must roll back.

Реакция клиента: Roll back; review the query plan before retrying the same statement.

Lock wait timeout — 55P03

Abort the lock acquisition once lock_timeout elapses (wait events: row_lock / page_lock / table_lock / transaction_lock).

Реакция клиента: Retry after back-off; reduce contention or shorten the transaction scope.

Idle-in-transaction timeout — 57P01

Terminate a session left idle inside an open transaction beyond the configured timeout.

Реакция клиента: Commit or roll back promptly; do not leave a transaction open while idle.

Snapshot too old (UNDO budget) — 72000

Force-close a reader whose snapshot needs UNDO records already purged under table-budget pressure.

Реакция клиента: Retry the whole transaction from the start; shorten long-running readers.

Disk full — 53100

Reject writes that would exceed available disk; fail-closed with no silent data loss.

Реакция клиента: Free space or extend storage; the write cannot proceed until capacity is available.