Re: Remove unused fields in ReorderBufferTupleBuf

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Re: Remove unused fields in ReorderBufferTupleBuf
Дата
Msg-id CAJ7c6TOuqrD0ogZtfV4P7g_ugxKTQNgRPCUjnqonLf+YCeWmkg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Remove unused fields in ReorderBufferTupleBuf  (Aleksander Alekseev <aleksander@timescale.com>)
Ответы Re: Remove unused fields in ReorderBufferTupleBuf  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
Hi,

> > But why didn't you pursue your idea of getting rid of the wrapper
> > structure ReorderBufferTupleBuf which after this patch will have just
> > one member? I think there could be hassles in backpatching bug-fixes
> > in some cases but in the longer run it would make the code look clean.
>
> Indeed. In fact turned out that I suggested the same above but
> apparently forgot:
>
> > On top of that IMO it doesn't make much sense to keep a one-field
> > wrapper structure. Perhaps we should get rid of it entirely and just
> > use HeapTupleData instead.
>
> After actually trying the refactoring I agree that the code becomes
> cleaner and it's going to be beneficial in the long run. Here is the
> patch.

I did a mistake in v4:

```
-    alloc_len = tuple_len + SizeofHeapTupleHeader;
+    alloc_len = tuple_len + HEAPTUPLESIZE;
```

Here is the corrected patch.

-- 
Best regards,
Aleksander Alekseev

Вложения

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

Предыдущее
От: Melih Mutlu
Дата:
Сообщение: Re: Improve WALRead() to suck data directly from WAL buffers when possible
Следующее
От: Amit Langote
Дата:
Сообщение: Re: remaining sql/json patches