Re: logical copy_replication_slot issues - Mailing list pgsql-hackers

From Arseny Sher
Subject Re: logical copy_replication_slot issues
Date
Msg-id 87h7yx7l1s.fsf@ars-thinkpad
Whole thread Raw
In response to Re: logical copy_replication_slot issues  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
Responses Re: logical copy_replication_slot issues
List pgsql-hackers
Masahiko Sawada <masahiko.sawada@2ndquadrant.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.

>     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.


-- cheers, arseny



pgsql-hackers by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: Bug in pg_restore with EventTrigger in parallel mode
Next
From: Bert Scalzo
Date:
Subject: New feature request: Query Rewrite Cache