Re: logical copy_replication_slot issues

From: Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>
To: Arseny Sher <a(dot)sher(at)postgrespro(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: logical copy_replication_slot issues
Date: 2020-03-10 05:58:01
Message-ID: CA+fd4k52caSHzjjPfcPmQF7YFfo7zuhkUuDabQsoNTdfTe+ugA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 9 Mar 2020 at 21:46, Arseny Sher <a(dot)sher(at)postgrespro(dot)ru> wrote:
>
>
> Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com> writes:
>
> > /*
> > - * Create logical decoding context, to build the initial snapshot.
> > + * Create logical decoding context to find start point or, if we don't
> > + * need it, to 1) bump slot's restart_lsn and xmin 2) check plugin sanity.
> > */
> >
> > Do we need to numbering that despite not referring them?
>
> No, it just seemed clearer to me this way. I don't mind removing the
> numbers if you feel this is better.
>

Okay.

> > ctx = CreateInitDecodingContext(plugin, NIL,
> > - false, /* do not build snapshot */
> > + false, /* do not build data snapshot */
> > restart_lsn,
> > logical_read_local_xlog_page, NULL, NULL,
> > NULL);
> > I'm not sure this change makes the comment better. Could you elaborate
> > on the motivation of this change?
>
> Well, DecodingContextFindStartpoint always builds a snapshot allowing
> historical *catalog* lookups. This bool controls whether the snapshot
> should additionally be suitable for looking at the actual data, this is
> e.g. used by initial data sync in the native logical replication.

Okay.

Anyway, since the patch looks good to me I've marked this patch as
"Ready for Committer". I think we can defer these things to
committers.

Regards,

--
Masahiko Sawada http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2020-03-10 05:59:00 Re: Crash by targetted recovery
Previous Message movead li 2020-03-10 05:13:42 Re: Asynchronous Append on postgres_fdw nodes.