pgsql: Disallow starting server with insufficient wal_level for existin

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Disallow starting server with insufficient wal_level for existin
Date: 2018-10-31 22:47:33
Message-ID: E1gHzGv-0000tw-Vs@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/679cb44e4b563a1af6049a482db56aa02809d80c

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

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2018-10-31 22:47:35 pgsql: Disallow starting server with insufficient wal_level for existin
Previous Message Andres Freund 2018-10-31 22:47:32 pgsql: Disallow starting server with insufficient wal_level for existin