Re: Redundant assignment of table OID for a HeapTuple?

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Jingtang Zhang <mrdrivingduck(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Redundant assignment of table OID for a HeapTuple?
Date: 2024-08-23 12:04:30
Message-ID: f7c7fa32-438b-428d-9624-fad5a1694d44@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 23/08/2024 14:50, Jingtang Zhang wrote:
> Hi hackers. I found a strange point when I was reading the heapam
> handlers of table access method, where heapam_tuple_insert and several
> handlers explicitly assign t_tableOid of the tuple to be operated,
> while later the t_tableOid is assigned again by like heap_prepare_insert or
> so. Is it redundant? Better to do it together with other tuple
> initialization
> code?

I wonder if we could get rid of t_tableOid altogether. It's only used in
a few places, maybe those places could get the informatiotion from
somewhere else. Notably, there's also a t_tableOid field in TupleTableSlot.

--
Heikki Linnakangas
Neon (https://neon.tech)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-08-23 12:17:26 Re: optimize hashjoin
Previous Message Ashutosh Bapat 2024-08-23 12:02:10 Re: Trim the heap free memory