Re: Redundant assignment of table OID for a HeapTuple? - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Redundant assignment of table OID for a HeapTuple?
Date
Msg-id f7c7fa32-438b-428d-9624-fad5a1694d44@iki.fi
Whole thread Raw
List 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)




pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Trim the heap free memory
Next
From: Robert Haas
Date:
Subject: Re: optimize hashjoin