Re: Ought to use heap_multi_insert() for pg_attribute/dependinsertions?

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Ought to use heap_multi_insert() for pg_attribute/dependinsertions?
Дата
Msg-id E0D4CC67-A1CF-4DF4-991D-B3AC2EB5FAE9@yesql.se
обсуждение исходный текст
Ответ на Re: Ought to use heap_multi_insert() for pg_attribute/dependinsertions?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Ought to use heap_multi_insert() for pg_attribute/dependinsertions?  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
> On 26 Jan 2020, at 21:30, Andres Freund <andres@anarazel.de> wrote:
> On 2020-01-22 23:18:12 +0100, Daniel Gustafsson wrote:
>>> On 26 Nov 2019, at 06:44, Michael Paquier <michael@paquier.xyz> wrote:
>>
>> Re this patch being in WoA state for some time [0]:
>>
>>> The regression tests of contrib/test_decoding are still failing here:
>>> +ERROR:  could not resolve cmin/cmax of catalog tuple
>>
>> This is the main thing left with this patch, and I've been unable so far to
>> figure it out.  I have an unscientific hunch that this patch is shaking out
>> something (previously unexercised) in the logical decoding code supporting
>> multi-inserts in the catalog.  If anyone has ideas or insights, I would love
>> the help.
>
> Perhaps we can take a look at it together while at fosdem? Feel free to
> remind me...

Which we did, and after that I realized I had been looking at it from the wrong
angle.  Returning to it after coming home from FOSDEM I believe I have found
the culprit.

Turns out that we in heap_multi_insert missed to call log_heap_new_cid for the
first tuple inserted, we only do it in the loop body for the subsequent ones.
With the attached patch, the v6 of this patch posted upthead pass the tests for
me.  I have a v7 brewing which I'll submit shortly, but since this fix
unrelated to that patchseries other than as a pre-requisite I figured I'd post
that separately.

cheers ./daniel


Вложения

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

Предыдущее
От: Michail Nikolaev
Дата:
Сообщение: Re: BUG #16108: Colorization to the output of command-line hasunproperly behaviors at Windows platform
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: explain HashAggregate to report bucket and memory stats