lock file “…” is empty

SQLSTATE F0001 condition lock_file_exists class F0 — Configuration File Error severity FATAL
Reproduced & verified on PostgreSQL 14.23, 15.18, 16.14, 17.10 and 18.4 — identical message on every version.
Last reviewed 7 Jun 2026 · Reproduced live with the SQL on this page.

Symptoms

A statement failed with SQLSTATE F0001 (lock_file_exists), reported at severity FATAL. This is a Configuration File Error condition: PostgreSQL emits the message lock file "…" is empty.

What the server log shows

FATAL:  lock file "…" is empty
HINT:  Either another server is starting, or the lock file is the remnant of a previous server startup crash.

Why PostgreSQL raises this

Class F0 (Configuration File Error) is raised when a configuration file is malformed or a parameter value is invalid.

As described in PostgreSQL’s Section 19.1 Setting Parameters and Appendix A (PostgreSQL Error Codes), SQLSTATE F0001 carries the condition name lock_file_exists in class Configuration File Error. (Paraphrased — see the linked reference for the exact wording.)

Common causes

How to fix it

  1. Fix the offending line and reload (pg_ctl reload).
  2. Validate parameter values against the documented range.
  3. Check the log for the exact file and line reported.

Version applicability

This message is present in PostgreSQL 15, 16, 17, 18 and 19.

Related & next steps

Reference: PostgreSQL Section 19.1 Setting Parameters.