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:02:11
Message-ID: CAJ7c6TM0sCuxk_aAhkDuSJmr402uJdrYKats-5_GooD7xLg57g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2023-07-26 13:09:02 Re: cataloguing NOT NULL constraints
Previous Message Aleksander Alekseev 2023-07-26 12:50:53 Re: [PATCH] Check more invariants during syscache initialization