Re: patch to ensure logical decoding errors early
Dave Cramer <davecramer@gmail.com>
From: Dave Cramer <davecramer@gmail.com>
To: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: Andres Freund <andres@anarazel.de>, Petr Jelinek <petr@2ndquadrant.com>, Simon Riggs <simon@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-08-01T15:07:24Z
Lists: pgsql-hackers
Attachments
- 0001-Ensure-pg_create_logical_replication_slot-fails-if-t.patch (application/octet-stream) patch 0001
On 1 August 2018 at 10:13, Petr Jelinek <petr.jelinek@2ndquadrant.com> wrote: > Hi, > > On 31/07/18 20:58, Andres Freund wrote> > >> diff --git a/src/backend/replication/logical/logical.c > b/src/backend/replication/logical/logical.c > >> index 3cd4eef..9f883b9 100644 > >> --- a/src/backend/replication/logical/logical.c > >> +++ b/src/backend/replication/logical/logical.c > >> @@ -143,8 +143,7 @@ StartupDecodingContext(List *output_plugin_options, > >> * (re-)load output plugins, so we detect a bad (removed) output > plugin > >> * now. > >> */ > >> - if (!fast_forward) > >> - LoadOutputPlugin(&ctx->callbacks, > NameStr(slot->data.plugin)); > >> + LoadOutputPlugin(&ctx->callbacks, NameStr(slot->data.plugin)); > > > > So this actually was broken by 9c7d06d60680c7f00d931233873dee81fdb311c6 > > and worked before? Petr, Simon? Isn't the actual bug here that > > CreateInitDecodingContext() passes true for fast_forward? Dave, could > > you confirm this is the case? If so, this'll end up actually being an > > open items entry... > > > > Indeed. > See attached patch which fixes it, and adds a test for it.
Commits
-
Fix logical replication slot initialization
- c40489e449ea 12.0 landed
- 7326a7d63801 11.0 landed
-
Ability to advance replication slots
- 9c7d06d60680 11.0 cited