Re: Binary support for pgoutput plugin

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Binary support for pgoutput plugin
Дата
Msg-id CADK3HHKo2GW=oQeVFM7cjA5GWSJmgON5moV_2pxrZsJQH4PO=g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Binary support for pgoutput plugin  (Dmitry Dolgov <9erthalion6@gmail.com>)
Ответы Re: Binary support for pgoutput plugin  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Binary support for pgoutput plugin  (Dmitry Dolgov <9erthalion6@gmail.com>)
Список pgsql-hackers


On Fri, 8 Nov 2019 at 11:20, Dmitry Dolgov <9erthalion6@gmail.com> wrote:
> On Tue, Nov 05, 2019 at 07:16:10AM -0500, Dave Cramer wrote:
>
> See attached

    --- a/src/backend/replication/logical/worker.c
    +++ b/src/backend/replication/logical/worker.c
    @@ -1779,6 +1779,7 @@ ApplyWorkerMain(Datum main_arg)
        options.slotname = myslotname;
        options.proto.logical.proto_version = LOGICALREP_PROTO_VERSION_NUM;
        options.proto.logical.publication_names = MySubscription->publications;
    +   options.proto.logical.binary = MySubscription->binary;

I'm a bit confused, shouldn't be there also

        --- a/src/backend/catalog/pg_subscription.c
        +++ b/src/backend/catalog/pg_subscription.c
        @@ -71,6 +71,7 @@ GetSubscription(Oid subid, bool missing_ok)
                        sub->name = pstrdup(NameStr(subform->subname));
                        sub->owner = subform->subowner;
                        sub->enabled = subform->subenabled;
        +       sub->binary = subform->subbinary;

in the GetSubscription?

yes, I have added this. I will supply an updated patch later.

Now a bigger question(s). 

Previously someone mentioned that we need to confirm whether the two servers are compatible for binary or not.

Checking to make sure the two servers have the same endianness is obvious.
Sizeof int, long, float, double, timestamp (float/int) at a minimum.

this could be done in libpqrcv_startstreaming. The question I have remaining is do we fall back to text mode if needed or simply fail ?

Dave

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Liudmila Mantrova
Дата:
Сообщение: Re: Does 'instead of delete' trigger support modification of OLD
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: TestLib::command_fails_like enhancement