Re: Remove unused fields in ReorderBufferTupleBuf
Aleksander Alekseev <aleksander@timescale.com>
From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Date: 2023-07-26T13:02:11Z
Lists: pgsql-hackers
Hi,
Thanks for the patch.
> However, node and alloc_tuple_size are not used at all. It seems an
> oversight in commit a4ccc1cef5a, which introduced the generation
> context and used it in logical decoding. I think we can remove them
> (only on HEAD). I've attached the patch.
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
```
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?
--
Best regards,
Aleksander Alekseev
Commits
-
Remove ReorderBufferTupleBuf structure.
- 08e6344fd642 17.0 landed
-
Generational memory allocator
- a4ccc1cef5a0 11.0 cited