pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Lower error level from PANIC to FATAL when restoring slots at st
Date: Thu, 01 Nov 2018 23:00:59 +0000
Message-ID: <E1gILxT-0004PB-1B@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1gILxT-0004PB-1B@gemulon.postgresql.org>
Permalink:  ../E1gILxT-0004PB-1B@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1gILxT-0004PB-1B@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Lower error level from PANIC to FATAL when restoring slots at st
  In-Reply-To: <E1gILxT-0004PB-1B@gemulon.postgresql.org>
  References: <E1gILxT-0004PB-1B@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox