pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Disallow starting server with insufficient wal_level for existin
Date: Wed, 31 Oct 2018 22:47:32 +0000
Message-ID: <E1gHzGu-0000ta-Ho@gemulon.postgresql.org> (raw)

Disallow starting server with insufficient wal_level for existing slot.

Previously it was possible to create a slot, change wal_level, and
restart, even if the new wal_level was insufficient for the
slot. That's a problem for both logical and physical slots, because
the necessary WAL records are not generated.

This removes a few tests in newer versions that, somewhat
inexplicably, whether restarting with a too low wal_level worked (a
buggy behaviour!).

Reported-By: Joshua D. Drake
Author: Andres Freund
Discussion: https://postgr.es/m/20181029191304.lbsmhshkyymhw22w@alap3.anarazel.de
Backpatch: 9.4-, where replication slots where introduced

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d35fd17cb58db72122912b57c75c8825ebf24285

Modified Files
--------------
src/backend/replication/logical/logical.c |  5 +++++
src/backend/replication/slot.c            | 30 ++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+)



view thread (6+ messages)  latest in thread

Message-ID: <E1gHzGu-0000ta-Ho@gemulon.postgresql.org>
Permalink:  ../E1gHzGu-0000ta-Ho@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1gHzGu-0000ta-Ho@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: andres@anarazel.de
  Subject: Re: pgsql: Disallow starting server with insufficient wal_level for existin
  In-Reply-To: <E1gHzGu-0000ta-Ho@gemulon.postgresql.org>
  References: <E1gHzGu-0000ta-Ho@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