Redundant initialization of table AM oid in relcache

From: Jingtang Zhang <mrdrivingduck(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Redundant initialization of table AM oid in relcache
Date: 2024-11-21 04:06:03
Message-ID: AFF74506-B925-46BB-B875-CF5A946170EB@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi~

Just found 'relam' field is assigned twice during relcache initialization. We
have a specific area for initialization AM related stuff several lines later:

> /*
> * initialize the table am handler
> */
> relation->rd_rel->relam = HEAP_TABLE_AM_OID;
> relation->rd_tableam = GetHeapamTableAmRoutine();

so previous assignment seems not needed and can be removed.

Regards, Jingtang

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2024-11-21 04:07:09 Re: proposal: schema variables
Previous Message Sanjay Khatri 2024-11-21 03:22:19 Re: Windows 2016 server crashed after changes in Postgres 15.8 pgAdmin