Re: Remove unused fields in ReorderBufferTupleBuf

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Subject: Re: Remove unused fields in ReorderBufferTupleBuf
Date: 2023-07-26 13:20:49
Message-ID: CAJ7c6TO7-_z=urX5z3nf9G5iFegKQx--ZWUXhfHbDS72CPy0oA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
v2-0001-Remove-unused-fields-in-ReorderBufferTupleBuf.patch application/octet-stream 1.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhang Mingli 2023-07-26 13:29:53 Re: [PATCH] Check more invariants during syscache initialization
Previous Message Matthias van de Meent 2023-07-26 13:16:02 Re: incremental-checkopints