Remove redundant initialization of smgr pointer for relcache

From: Jingtang Zhang <mrdrivingduck(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Remove redundant initialization of smgr pointer for relcache
Date: 2025-11-10 16:19:33
Message-ID: 468115EF-D287-4440-9E5B-CAF06B7EA86D@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi~

We seem to have a reduntant initialization of rd_smgr for a newly created
relcache entry. Commonly, the pointer is assigned as NULL after a relcache
is palloc'ed. But this one seems unnecessary because the rd_smgr has already
been initialized by earlier AllocateRelationDesc. Propose a patch for it.

--
Regards, Jingtang

Attachment Content-Type Size
0001-Remove-redundant-initialization-of-smgr-pointer-for-.patch application/octet-stream 929 bytes

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2025-11-10 16:24:23 Re: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h
Previous Message Andres Freund 2025-11-10 16:11:00 Re: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h