Re: Assertion failure while streaming toasted data

Поиск
Список
Период
Сортировка
От Pavan Deolasee
Тема Re: Assertion failure while streaming toasted data
Дата
Msg-id CABOikdObowGCa3hBg_G34XYNVYKqnEGd7_EZjfzGd9DrMneNBg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Assertion failure while streaming toasted data  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: Assertion failure while streaming toasted data  (Dilip Kumar <dilipbalaut@gmail.com>)
Список pgsql-hackers


On Tue, May 25, 2021 at 1:26 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:


I have identified the cause of the issue, basically, the reason is if
we are doing a multi insert operation we don't set the toast cleanup
until we get the last tuple of the xl_multi_insert [1].  Now, with
streaming, we can process the transaction in between the multi-insert
but while doing that the "change->data.tp.clear_toast_afterwards" is
set to false in all the tuples in this stream. And due to this we will
not clean up the toast.

Thanks. That matches my understanding too.
 

One simple fix could be that we can just clean the toast memory if we
are processing in the streaming mode (as shown in the attached patch).

I am not entirely sure if it works correctly. I'd tried something similar, but the downstream node using
my output plugin gets NULL values for the toast columns.  It's a bit hard to demonstrate that with the
test_decoding plugin, but if you have some other mechanism to test that change with an actual downstream
node receiving and applying changes, it will be useful to test with that.

Thanks,
Pavan
 
--
 Pavan Deolasee                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Skipping logical replication transactions on subscriber side
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Assertion failure while streaming toasted data