strxfrm(), in locale “…”, writes past the specified array length
Symptoms
A statement failed with SQLSTATE 58000 (system_error), reported at severity ERROR. This is a System Error (errors external to PostgreSQL itself) condition: PostgreSQL emits the message strxfrm(), in locale "…", writes past the specified array length.
- The client receives SQLSTATE
58000(system error). - The operation is rejected at
ERRORlevel; the statement does not complete.
What the server log shows
ERROR: strxfrm(), in locale "…", writes past the specified array length
HINT: Apply system library package updates.
Why PostgreSQL raises this
Class 58 (System Error) reports failures external to PostgreSQL itself — operating-system level I/O, file, or similar errors surfaced through the server.
As described in PostgreSQL’s Appendix A PostgreSQL Error Codes, SQLSTATE 58000 carries the condition name system_error in class System Error (errors external to PostgreSQL itself). (Paraphrased — see the linked reference for the exact wording.)
Common causes
- An underlying file/IO operation failed at the OS level.
- Disk, permissions, or hardware problems on the data directory.
- A duplicate or missing file detected by the server.
How to fix it
- Check OS logs, disk health, and filesystem permissions.
- Ensure the data directory is intact and writable.
- Address the underlying hardware/OS condition, then retry.
Version applicability
This message text is present in PostgreSQL 15.
Related & next steps
Reference: PostgreSQL Appendix A PostgreSQL Error Codes.