54000
Read PG 18 manual ↗program_limit_exceeded
- SQLSTATE
- 54000
- Condition name
- program_limit_exceeded
- Class
- Program Limit Exceeded
- Source macro
- ERRCODE_PROGRAM_LIMIT_EXCEEDED
- Evidence
- Source path confirmed
English SQLSTATE atlas: authored explanations and source/runtime evidence are separate from the manual definitions. View source ↗
At a glance
54000 is used when a concrete program, representation, or extension limit is exceeded. Fixed examples include safe allocation-size arithmetic, relation block numbering, array dimensions/size, cube dimensions, and hstore pair counts; the source path identifies the limit.
Meaning
The condition is not a general “large value” warning. Core mcxt.c checks addition and multiplication of allocation sizes and emits invalid memory allocation request size ... on overflow; relation storage refuses a block number at InvalidBlockNumber; array construction/subscripts enforce dimension and total-size limits. Extension paths add their own ceilings: cube reports that a cube cannot have more than %d dimensions, while hstore reports actual and maximum pair counts. The operation and source path define the limit.
Diagnosis
Identify the source component and reported actual/maximum values. Check whether this is allocation-size overflow, relation growth, array dimensions/size, cube dimensions, hstore pairs, or another component. Inspect the expression or generated value that expands the request; an allocation-size overflow is a request-arithmetic problem, not proof that the host is out of RAM.
Response
Reduce the requested size, dimension, block growth, or pair count; split the value or choose a representation whose documented limit fits the requirement. For relation limits, redesign or partition storage before retrying. If an ERROR occurs inside an explicit transaction, use ROLLBACK or ROLLBACK TO SAVEPOINT before retrying; in autocommit, retry only after the request fits the named program limit. Do not discard elements silently or “fix” arithmetic overflow by blindly raising an unrelated memory setting; preserve the business rule for truncation or decomposition.
Versions
The locked catalogue records this condition from 7.4; cited core and extension paths are PostgreSQL 18.6 source. No limit was forced and no oversized extension value was created.
Sources
contrib/hstore/hstore_io.c#L522-L525
src/backend/utils/mmgr/mcxt.c#L1683-L1718
src/backend/storage/smgr/md.c#L493-L504
src/backend/utils/adt/arraysubs.c#L147-L152
The structured evidence record records fixed messages and the source/runtime boundary.
Source evidence
Evidence belongs to the frozen source and runtime versions listed here. It is not a runtime verification of the selected manual version.
54000 is program_limit_exceeded in SQLSTATE Class 54.
Method: Read fixed definition.
The cited PostgreSQL 18.6 source paths support the representative resource and object-state mechanisms described.
Method: Read complete fixed source contexts.
Limits: Source confirmation is not natural runtime.
Core safe allocation-size arithmetic, relation block growth, and array subscript dimensions use 54000 independently of cube and hstore extension limits.
Method: Read complete fixed guards and their ereport groups.
The locked catalogue records 54000 from 7.4; that boundary does not prove exact implementation introduction.
Method: Use catalogue boundary.
- src/backend/utils/errcodes.txt · REL_18_6 ·
724edf9bde9d356724ad384a2e196edc3c9f80f7 - contrib/cube/cube.c · REL_18_6 ·
724edf9bde9d356724ad384a2e196edc3c9f80f7 - contrib/hstore/hstore_io.c · REL_18_6 ·
724edf9bde9d356724ad384a2e196edc3c9f80f7 - src/backend/utils/mmgr/mcxt.c · REL_18_6 ·
724edf9bde9d356724ad384a2e196edc3c9f80f7 - src/backend/storage/smgr/md.c · REL_18_6 ·
724edf9bde9d356724ad384a2e196edc3c9f80f7 - src/backend/utils/adt/arraysubs.c · REL_18_6 ·
724edf9bde9d356724ad384a2e196edc3c9f80f7
Message templates
ERROR · message.0
Primary
cube dimension limit
Hint
A cube cannot have more than %d dimensions.
ERROR · message.1
Primary
number of pairs (%d) exceeds the maximum allowed (%d)
ERROR · message.2
Primary
invalid memory allocation request size %zu + %zu
ERROR · message.3
Primary
cannot extend file "%s" beyond %u blocks
ERROR · message.4
Primary
number of array dimensions (%d) exceeds the maximum allowed (%d)
Reproduction & repair cases
No reproduction case is attached to this condition.
Recorded runtime evidence
No runtime observation is attached to this entry.
Definition snapshot: english-manuals:500abfa08a1ce58614f30c3b9cb… · English manual source