Notice: We've updated our Privacy Policy, effective November 14, 2024.

S4: Database system is shutting down

Category: Server Events
SQLSTATE: 57P01 (Class 57 — Operator Intervention: admin_shutdown)
Urgency: low

Example Postgres Log Output:

LOG: received smart shutdown request
LOG: received fast shutdown request
LOG: aborting any active transactions
LOG: shutting down
LOG: the database system is shutting down
LOG: database system is shut down

Explanation:

This event indicates a shutdown of the Postgres server, usually as part of doing a planned restart or upgrade operation.

Depending on the mode of restart (smart vs fast), currently running queries will be allowed to finish. Smart shutdown will also wait for any currently running backup to finish, which may take a while.

Note that all new connections will be rejected whilst Postgres is in the shutting down state.

Recommended Action:

When doing a smart shutdown, depending on how long the shutdown is taking, it might sometimes make sense to manually cancel queries or any running backup, to accelerate the system coming back up again.

You can cancel a currently running backup by calling pg_stop_backup() to accelerate a smart shutdown.

Learn More:

No additional resources available.


Download Free eBook: The Top 6 Postgres Log Events
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →