pgsql: Lower error level from PANIC to FATAL when restoring slots at st

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Lower error level from PANIC to FATAL when restoring slots at st
Date: 2018-11-01 23:00:59
Message-ID: E1gILxT-0004PB-1B@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6286efb5240f4ce4f1cd51bc11f49d367b7e7f62

Modified Files
--------------
src/backend/replication/slot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2018-11-02 12:54:50 pgsql: doc: use simpler language for NULL return from ANY/ALL
Previous Message Peter Eisentraut 2018-11-01 19:59:15 pgsql: Remove obsolete pg_attrdef.adsrc column