From: | Dave Cramer <davecramer(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Petr Jelinek <petr(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: patch to ensure logical decoding errors early |
Date: | 2018-08-01 14:08:38 |
Message-ID: | CADK3HH+mqq-fNQ-B-Npkc4ZdjHcooJc9AprzAPGQCDDE+ZT9yQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 31 July 2018 at 14:58, Andres Freund <andres(at)anarazel(dot)de> wrote:
> Hi,
>
> On 2018-07-31 14:51:12 -0400, Dave Cramer wrote:
> > This patch does 2 things
> >
> > 1) Ensure that when the slot is created
> > with pg_create_physical_replication_slot if the output plugin does not
> > exist it will error.
>
> *logical, I assume?
>
> Yes, logical.
>
> > 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...
>
Ya, I think that is really the issue. I will redo my patch
>
>
> > /*
> > * Now that the slot's xmin has been set, we can announce
> ourselves as a
> > @@ -312,7 +311,7 @@ CreateInitDecodingContext(char *plugin,
> > ReplicationSlotSave();
> >
> > ctx = StartupDecodingContext(NIL, InvalidXLogRecPtr, xmin_horizon,
> > -
> need_full_snapshot, true,
> > +
> need_full_snapshot, true,
> >
> read_page, prepare_write, do_write,
> >
> update_progress);
>
Hmmm, I guess I should read my patches more carefully before sending them
> Huh?
>
>
>
Dave Cramer
From | Date | Subject | |
---|---|---|---|
Next Message | Petr Jelinek | 2018-08-01 14:13:39 | Re: patch to ensure logical decoding errors early |
Previous Message | Emre Hasegeli | 2018-08-01 14:07:47 | Re: New Defects reported by Coverity Scan for PostgreSQL |