Re: [BUG]Update Toast data failure in logical replication

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Re: [BUG]Update Toast data failure in logical replication
Дата
Msg-id CAFiTN-sD+eL4tDOmrBoy5VLihyyPwNycmw--oQOXNSGm52JzNg@mail.gmail.com
обсуждение исходный текст
Ответ на RE: [BUG]Update Toast data failure in logical replication  ("tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>)
Ответы Re: [BUG]Update Toast data failure in logical replication  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Список pgsql-hackers
On Wed, Jun 2, 2021 at 2:37 PM tanghy.fnst@fujitsu.com
<tanghy.fnst@fujitsu.com> wrote:
>
> On Wed, Jun 2, 2021 2:44 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> > Attached patch fixes that, I haven't yet added the test case.  Once
> > someone confirms on the approach then I will add a test case to the
> > patch.
>
>         key_tuple = heap_form_tuple(desc, values, nulls);
>         *copy = true;
> ...
>                 key_tuple = toast_flatten_tuple(oldtup, desc);
>                 heap_freetuple(oldtup);
>         }
> +       /*
> +        * If key tuple doesn't have any external data and key is not changed then
> +        * just free the key tuple and return NULL.
> +        */
> +       else if (!key_changed)
> +       {
> +               heap_freetuple(key_tuple);
> +               return NULL;
> +       }
>
>         return key_tuple;
>  }
>
> I think "*copy = false" should be added before return NULL because we don't return a modified copy tuple here.
Thoughts?

Yes, you are right.  I will change it in the next version, along with
the test case.


-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: "houzj.fnst@fujitsu.com"
Дата:
Сообщение: RE: Parallel INSERT SELECT take 2
Следующее
От: "tanghy.fnst@fujitsu.com"
Дата:
Сообщение: tab-complete for CREATE TYPE ... SUBSCRIPT