Use SMgrRelation instead of SMgrRelationData * in pgaio_io_set_target_smgr()

From: Japin Li <japinli(at)hotmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Use SMgrRelation instead of SMgrRelationData * in pgaio_io_set_target_smgr()
Date: 2026-03-13 07:05:05
Message-ID: SY7PR01MB10921D0F6F3C2682570D6C31BB645A@SY7PR01MB10921.ausprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hi, hackers

While reading smgr.h, I noticed an inconsistent type usage in
pgaio_io_set_target_smgr(). Currently the function is declared as:

extern void pgaio_io_set_target_smgr(PgAioHandle *ioh,
SMgrRelationData *smgr,
ForkNumber forknum,
BlockNumber blocknum,
int nblocks,

However, SMgrRelation is defined as "typedef SMgrRelationData * SMgrRelation;",
and all other functions in the smgr subsystem use SMgrRelation as the parameter
type.

To keep the code consistent with the rest of the smgr API, this patch changes
the parameter from SMgrRelationData * to SMgrRelation in both the definition
and declaration.

This is purely a style/consistency cleanup with no functional change.

Thoughts? Is this change acceptable?

--
Regards,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.

Attachment Content-Type Size
v1-0001-Use-SMgrRelation-instead-of-SMgrRelationData-in-p.patch text/x-patch 1.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou (Fujitsu) 2026-03-13 07:12:09 RE: [PATCH] Support automatic sequence replication
Previous Message jian he 2026-03-13 06:19:14 Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions