public inbox for [email protected]  
help / color / mirror / Atom feed
From: Chao Li <[email protected]>
To: Japin Li <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Use SMgrRelation instead of SMgrRelationData * in pgaio_io_set_target_smgr()
Date: Fri, 13 Mar 2026 15:29:31 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <SY7PR01MB10921D0F6F3C2682570D6C31BB645A@SY7PR01MB10921.ausprd01.prod.outlook.com>
References: <SY7PR01MB10921D0F6F3C2682570D6C31BB645A@SY7PR01MB10921.ausprd01.prod.outlook.com>



> On Mar 13, 2026, at 15:05, Japin Li <[email protected]> wrote:
> 
> 
> 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.
> 
> <v1-0001-Use-SMgrRelation-instead-of-SMgrRelationData-in-p.patch>

pgaio_io_set_target_smgr doesn’t update smgr, so, instead of “SMgrRelation”,  I think it’s better to change the type to "const SMgrRelationData *”.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/









view thread (8+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Use SMgrRelation instead of SMgrRelationData * in pgaio_io_set_target_smgr()
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox