mirror of
https://github.com/postgres/postgres.git
synced 2025-05-08 07:21:33 +03:00
Lower error level from PANIC to FATAL when restoring slots at startup
When restoring slot information from disk at startup and filling in shared memory information, the startup process would issue a PANIC message if more slots are found than what max_replication_slots allows, and then Postgres generates a core dump, recommending to increase max_replication_slots. This gives users a switch to crash Postgres at will by creating slots, lower the configuration to not support it, and then restart it. Making Postgres crash hard in this case is overdoing it just to give a recommendation to users. So instead use a FATAL, which makes Postgres fail to start without crashing, still giving the recommendation. This is more consistent with what happens for prepared transactions for example. Author: Michael Paquier Reviewed-by: Andres Freund Discussion: https://postgr.es/m/20181030025109.GD1644@paquier.xyz
This commit is contained in:
parent
96b00c433c
commit
6286efb524
@ -1563,7 +1563,7 @@ RestoreSlotFromDisk(const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!restored)
|
if (!restored)
|
||||||
ereport(PANIC,
|
ereport(FATAL,
|
||||||
(errmsg("too many replication slots active before shutdown"),
|
(errmsg("too many replication slots active before shutdown"),
|
||||||
errhint("Increase max_replication_slots and try again.")));
|
errhint("Increase max_replication_slots and try again.")));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user