select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SQLSTATE / CLASS 53 · INSUFFICIENT RESOURCES

disk_full

SQLSTATE
53100
Condition name
disk_full
Class
Insufficient Resources
Source macro
ERRCODE_DISK_FULL
Evidence
Source path confirmed
Analysis & operational context

English SQLSTATE atlas: authored explanations and source/runtime evidence are separate from the manual definitions. View source ↗

<h1>53100</h1>

At a glance

53100 reports the explicit short-write branch of a file write. Fixed paths cover base-backup output and relation-file extension; the diagnostic names the file, partial byte count, requested count, and offset or block.

Meaning

The short-write messages carry the target file, bytes written versus requested, and an offset or block, with the hint Check free disk space.. The same md.c function first handles a negative FileWrite result through errcode_for_file_access() and %m; in the fixed helper's saved-errno switch, ENOSPC maps to 53100, while EFBIG and EDQUOT are not listed and therefore take its ERRCODE_INTERNAL_ERROR default. This is a storage-write boundary, not a generic SQL data error or proof that the host volume is full.

Diagnosis

Identify the filesystem and target path from the message, then check free space, quota, mount state, write errors, and whether the database or backup destination is the affected volume. Compare the offset/block and partial byte count with the operation and correlate server logs. If the primary is could not ...: %m rather than the short-write template, inspect the saved errno: the fixed helper maps ENOSPC to 53100, but sends unlisted EFBIG and EDQUOT through its internal-error default. Do not relabel an errno-specific SQLSTATE as 53100.

Response

Free or provision capacity on the named filesystem, correct the reported write condition, or redirect the operation to a suitable destination. Treat a partial base backup or relation write as incomplete until the operation has been validated; resume or retry only under that operation's documented recovery procedure. If this ERROR occurs inside an explicit transaction, use ROLLBACK or ROLLBACK TO SAVEPOINT before retrying; in autocommit, retry only after the storage cause is corrected. Do not create disk pressure on a user instance to test this code.

Versions

The locked catalogue records this condition from 7.4; the cited write paths are PostgreSQL 18.6 source. No disk-full runtime was run.

Sources

src/backend/backup/basebackup_server.c#L177-L182

src/backend/storage/smgr/md.c#L521-L526

src/backend/storage/smgr/md.c#L512-L526

src/backend/utils/error/elog.c#L868-L938

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.

53100 is disk_full in SQLSTATE Class 53.

Method: Read fixed definition.

src.errcodes.18.6

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.

src.path.0 src.path.1 src.path.2 src.path.3

The relation write path sends a negative FileWrite result through errcode_for_file_access(), while a short write explicitly uses ERRCODE_DISK_FULL; these are separate source branches.

Method: Read the complete mdextend error branch.

src.path.2

In the fixed errno helper, ENOSPC maps to ERRCODE_DISK_FULL; EFBIG and EDQUOT are not listed and therefore use the helper's default internal-error mapping.

Method: Read the complete saved-errno switch, including its default branch.

Limits: This records the PostgreSQL helper mapping; it does not claim that every operating-system write failure presents this SQLSTATE.

src.path.3

The locked catalogue records 53100 from 7.4; that boundary does not prove exact implementation introduction.

Method: Use catalogue boundary.

src.errcodes.18.6

Message templates

ERROR · message.0

Primary

could not write file "%s": wrote only %d of %d bytes at offset %lld

Hint

Check free disk space.
ERROR · message.1

Primary

could not extend file "%s": wrote only %d of %d bytes at block %u

Hint

Check free disk space.
ERROR · message.2

Primary

could not extend file "%s": %m

The source selects errcode_for_file_access() from errno; this template is not itself proof that the resulting SQLSTATE is 53100.

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:7214cd508f706bd2f84c2afa95f… · English manual source