]> granicus.if.org Git - postgresql/commit
Disallow starting server with insufficient wal_level for existing slot.
authorAndres Freund <andres@anarazel.de>
Wed, 31 Oct 2018 21:47:41 +0000 (14:47 -0700)
committerAndres Freund <andres@anarazel.de>
Wed, 31 Oct 2018 22:46:40 +0000 (15:46 -0700)
commitc33a01c7979dc267c81ece612af783ecacf22bc0
tree0e01efb5b4f25b8dff372cf6d5f419e0b334e72b
parent2493e2c2d167ce7ad7d034c7c7de17d79e806c7a
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
src/backend/replication/logical/logical.c
src/backend/replication/slot.c
src/test/recovery/t/006_logical_decoding.pl