A server parameter determining whether PostgreSQL will restart after a crash

restart_after_crash is a configuration paramter determining whether PostgreSQL will restart itself following a crash situation.

restart_after_crash was added in PostgreSQL 9.1.

Default value

Default value for restart_after_crash is: on.


Normally PostgreSQL will attempt to restart itself following a crash situaton. However in some circumstances it may be desirable to suppress this behaviour; for example restart_after_crash is set to off when running TAP tests.

Change history


Log output from a crash situation where restart_after_crash is set to off:

2021-06-06 08:21:58.924 UTC [8616] LOG:  server process (PID 8664) was terminated by signal 6: Aborted
2021-06-06 08:21:58.924 UTC [8616] DETAIL:  Failed process was running: COPY tbl_kqbdgize FROM STDIN (format 'csv');
2021-06-06 08:21:58.924 UTC [8616] LOG:  terminating any other active server processes
2021-06-06 08:21:58.925 UTC [8616] LOG:  shutting down because restart_after_crash is off
2021-06-06 08:21:58.938 UTC [8616] LOG:  database system is shut down


Development/testing, GUC configuration item

See also