Re: Remove unused fields in ReorderBufferTupleBuf - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: Remove unused fields in ReorderBufferTupleBuf
Date
Msg-id CAJ7c6TO7-_z=urX5z3nf9G5iFegKQx--ZWUXhfHbDS72CPy0oA@mail.gmail.com
Whole thread Raw
In response to Re: Remove unused fields in ReorderBufferTupleBuf  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: Remove unused fields in ReorderBufferTupleBuf
List pgsql-hackers
Hi,

> I'm afraid it's a bit incomplete:
>
> ```
> ../src/backend/replication/logical/reorderbuffer.c: In function
> ‘ReorderBufferGetTupleBuf’:
> ../src/backend/replication/logical/reorderbuffer.c:565:14: error:
> ‘ReorderBufferTupleBuf’ has no member named ‘alloc_tuple_size’
>   565 |         tuple->alloc_tuple_size = alloc_len;
>       |              ^~
> [829/1882] Compiling C object contrib/xml2/pgxml.so.p/xpath.c.o
> ```

Here is the corrected patch. I added it to the nearest CF [1].

> 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.
>
> Thoughts?

Alternatively we could convert ReorderBufferTupleBufData macro to an
inlined function. At least it will add some type safety.

I didn't change anything in this respect in v2. Feedback from the
community would be much appreciated.

[1]: https://commitfest.postgresql.org/44/4461/

--
Best regards,
Aleksander Alekseev

Attachment

pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: incremental-checkopints
Next
From: Zhang Mingli
Date:
Subject: Re: [PATCH] Check more invariants during syscache initialization