Fix logical replication slot initialization This was broken in commit 9c7d06d60680, which inadvertently gave the wrong value to fast_forward in one StartupDecodingContext call. Fix by flipping the value. Add a test for the obvious error, namely trying to initialize a replication slot with an nonexistent output plugin.
While at it, move the CreateDecodingContext call earlier, so that any errors are reported before sending the CopyBoth message. Author: Dave Cramer <[email protected]> Reviewed-by: Andres Freund <[email protected]> Discussion: https://postgr.es/m/cadk3hhlvkere1v4p02-5hj55h3_yjg3aetpxyey5t3wuzo2...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c40489e449ea08e154cd62fa055785873f7bdac8 Modified Files -------------- contrib/test_decoding/expected/slot.out | 2 ++ contrib/test_decoding/sql/slot.sql | 2 ++ src/backend/replication/logical/logical.c | 2 +- src/backend/replication/walsender.c | 23 +++++++++++++---------- 4 files changed, 18 insertions(+), 11 deletions(-)
