public inbox for [email protected]  
help / color / mirror / Atom feed
From: Chao Li <[email protected]>
To: Melanie Plageman <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Cc: Andres Freund <[email protected]>
Subject: Re: bufmgr: pass through I/O stats context in FlushUnlockedBuffer()
Date: Wed, 22 Apr 2026 06:24:04 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAKRu_aUfeVKFW34ZvuhY9tBXUKYfn8rs-8cf-aE4YSUFj-xEQ@mail.gmail.com>
References: <[email protected]>
	<CAAKRu_aUfeVKFW34ZvuhY9tBXUKYfn8rs-8cf-aE4YSUFj-xEQ@mail.gmail.com>



> On Apr 22, 2026, at 05:52, Melanie Plageman <[email protected]> wrote:
> 
> On Tue, Mar 31, 2026 at 10:15 PM Chao Li <[email protected]> wrote:
>> 
>> I noticed that FlushUnlockedBuffer() accepts io_object and io_context, but then ignores them and hardcodes IOOBJECT_RELATIONand IOCONTEXT_NORMAL instead:
>> ```
>> static void
>> FlushUnlockedBuffer(BufferDesc *buf, SMgrRelation reln,
>>                                        IOObject io_object, IOContext io_context)
>> {
>>        Buffer          buffer = BufferDescriptorGetBuffer(buf);
>> 
>>        BufferLockAcquire(buffer, buf, BUFFER_LOCK_SHARE_EXCLUSIVE);
>>        FlushBuffer(buf, reln, IOOBJECT_RELATION, IOCONTEXT_NORMAL); // <== HERE
>>        BufferLockUnlock(buffer, buf);
>> }
>> ```
>> 
>> Unless I am missing something, if a function accepts these parameters, they should generally be used.
> 
> Thanks for the patch. Committed in 31b0544b32b
> 
> - Melanie

Hi Melanie, thank you very much for pushing.

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









view thread (3+ messages)

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: bufmgr: pass through I/O stats context in FlushUnlockedBuffer()
  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