On Thu, Sep 24, 2020 at 5:11 PM Dilip Kumar <dilipbal...@gmail.com> wrote: > > On Thu, Sep 24, 2020 at 4:45 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > > > > > Have you checked what will function walrcv_server_version() will > > return? I was thinking that if we know that subscriber is connected to > > Publisher version < 14 then we can send the right value. > > But, suppose we know the publisher version is < 14 and user has set > streaming on while creating subscriber then still we will send the > right version? >
Yeah we can send the version depending on which server we are talking to? > I think tablesync we are forming a query so we are > forming as per the publisher's version. But here we are sending which > protocol version we are expecting for the data transfer so I feel it > should be LOGICALREP_PROTO_VERSION_NUM if we expect non-streaming > transfer and LOGICALREP_PROTO_STREAM_VERSION_NUM if we expect the > streaming transfer. > I am not sure if this is the right strategy. See libpqrcv_startstreaming, even if the user asked for streaming unless the server supports it we don't send the streaming option to the user. Another thing is this check will become more complicated if we need another feature like decode prepared to send different version or even if it is the same version, we might need additional checks. Why do you want to send a streaming protocol version when we know the server doesn't support it, lets behave similar to what we do in libpqrcv_startstreaming. -- With Regards, Amit Kapila.