Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFJ1Z-004xGI-1n for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Apr 2026 21:52:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFJ1Y-00AZz8-2U for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Apr 2026 21:52:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFJ1Y-00AZz0-1M for pgsql-hackers@lists.postgresql.org; Tue, 21 Apr 2026 21:52:52 +0000 Received: from mail-yx1-xb133.google.com ([2607:f8b0:4864:20::b133]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFJ1W-00000002Mv4-1kDx for pgsql-hackers@postgresql.org; Tue, 21 Apr 2026 21:52:52 +0000 Received: by mail-yx1-xb133.google.com with SMTP id 956f58d0204a3-65318dafbcbso4790563d50.2 for ; Tue, 21 Apr 2026 14:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776808368; cv=none; d=google.com; s=arc-20240605; b=PHCb4Zve19PqokViWkDBCuEeQ1Ju6OV2wHsmKc4dn0PAXqbvGsmPXP8NH5YFW+oM7/ KzRKYv2m9l1RPhnqjnp74l0rUiyLI7SJQXvJdwFPhFe9DT/7jc6XtcQUwLFKtL0ds51c Uivz4Ss6ZMsDWTWse2KZDzSrpzMjSu5kHWQJPHfDKw14Dk+wisXmxVgRGy7Uscl5qC5L A1oG/nnC+D0VEeH8eMXmiO3yLfLbVi4lXxvIvPIGB5yvUJjOXonJB9c++HRb49I5MnxI 6jMFNi5FsxP7MNe2BQCqk+cu9ZMjciJuzbYLGiPrkrHwt4g9cFW4O0lrCKb27xU3bGth TY4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=n1BoHdkocuchgsClIC/JqD5bZ6VluFDt8oDefCav7Uw=; fh=Y2Lgky/UYauITGQArhm29WiQ8QHdTSEIN/vimgmE0GQ=; b=VncRX5RJCZz9MqVRqihmz7T9hJjbJJ+HnEw8K5VWBHgoq1I/whJbhzNMR9VmtqjUzR qhBAXixINB1ypQ344vLbCFwgBEm8PGb01wdtdWDwDhmpLQ9NTwkJsbFijLX5sCWgUvqz Vxki1fIaLff553tERKpnYGU5XNtH6hQEQCWpvxq6MMqb21E8WWQHjxGzeSs5Ok5GdpY0 EHKrQ8+Tcu9kERPGPH8e96tUj4fFQGmQ6mZ0SUuYWBgb/hpBOUL9jvcgbvsNcpVx4XuJ 4LmnUyj2lYoFiOiZQfRY/KQF4Tko842xJ9fELIjPzz7qw3YbcidJleoQ7aSei5EEYXK8 fjzw==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776808368; x=1777413168; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=n1BoHdkocuchgsClIC/JqD5bZ6VluFDt8oDefCav7Uw=; b=VVH46IsWfb73fEBIZqrhGdzwwEjx+Tjy51RnTdBJk1k/EDro1K49SYYueL7XnIHr8H zCX1kqvNmP8lZUecxzsot1PPUrYZtD07q0qayyyxHhIorovSFlzXzMvT9OfvJDg8lLlR NHskiZWVM1I6HoFA19grJs2YbtwhPe5AnkkCeHKypKk/tVhQ7uT1YJcN3BvvuayuRHyU l5daUjqZLd6xidPrJABNqkROHY4uiw1LYecTYLHxQuxJKU2Zx3d4gWZ43yunbHVvX1qf IM8OHliCCKVJOAd688saR1ZJn7XXaep+dgciZhmVAFBoXsDhEjiLx+u/KCbjvZ0s20iI bbPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776808368; x=1777413168; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=n1BoHdkocuchgsClIC/JqD5bZ6VluFDt8oDefCav7Uw=; b=dw2YrPLfTnLs6NxCdXYMQLxAVW0yIyVll3afn/hZ/jXA4ZNCaHf8vPZguHXfA/vEoJ tAZggdAfY11wJsitQmDuKdsdFgnZteMH/JIChCv5ODfRKlRBQ/0iqdH2UnHp2n7JlAOi asYuO4UmyWujlZhJvgNU0yEbBH4jj7sjtzPMh1QLiXFWGl4ta1RmPIGsknaIW1LcYsHI KDuVRruNYNLZl6tZOeMn+/LZsb/21SX/+hzKEsvpcg8CbDBVazlBhfbHG2lgwlY6b4U8 mmc4uJzSk9ai0C7o+/SkUJD6ibsacx6Y8tzPLvnhewop9gsPwmuVrA2REqTNiVhnNczo lGaw== X-Gm-Message-State: AOJu0YxEZqTEmavEYuy0RaJas7vu1LoEtPfuu4qfsVyxVboxx8NfbQzM TuqfRRdmbMywax5crJGT8bqj3+oyECqS8EpRN5SW07C09BISwW1iIUjV5awZH3u0lH2jzMAU8wD wkgw67C4SXasI0FQaTx/rPwlQXqCjUx8= X-Gm-Gg: AeBDiev9h567cdxlv6h+upbyopU/yhBdrk2nz6w6M95PuRZAnuFl5I3lkiBw2Fs4Vh4 5NRaK5tkRlQVcNiKmC3QusQqa6SvHWSehaaHLDA4Z7KacPO3s0CmXDkAG48JPlBuPmvxT1HaCH5 FcVQE4Nm1RwFNdFhdqkiQJvADopusJeJkSd7EC8bE8JSAyUhitJCyKBjs8KYoEFAhKpgaA9E5nK Wsppzb1kwQNEj0DqFEdAypcbHMzrEMSwsxs4/N/WVbnc3owBObMDeu4rh98XwFCOfEPV3DUnAAn Gmo4Qwdjk043/3oriCHVyQNvK2c1qF6kxNUJZYKhF/KfbT/oF2eSpCFh4VhQ64AKkcn15j7hpp2 G2mBQapD+35mlsFV4rMo= X-Received: by 2002:a53:d005:0:b0:654:2ef4:a5d0 with SMTP id 956f58d0204a3-6542ef4b01cmr7681772d50.59.1776808368112; Tue, 21 Apr 2026 14:52:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Melanie Plageman Date: Tue, 21 Apr 2026 17:52:35 -0400 X-Gm-Features: AQROBzBqcsqbnd2PeMfcr2isllSID4X02VFRPpeaFBqD8y6emUyu0SfM-sxfQ-E Message-ID: Subject: Re: bufmgr: pass through I/O stats context in FlushUnlockedBuffer() To: Chao Li Cc: PostgreSQL-development , Andres Freund Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Mar 31, 2026 at 10:15=E2=80=AFPM Chao Li w= rote: > > I noticed that FlushUnlockedBuffer() accepts io_object and io_context, bu= t then ignores them and hardcodes IOOBJECT_RELATIONand IOCONTEXT_NORMAL ins= tead: > ``` > static void > FlushUnlockedBuffer(BufferDesc *buf, SMgrRelation reln, > IOObject io_object, IOContext io_= context) > { > Buffer buffer =3D BufferDescriptorGetBuffer(buf); > > BufferLockAcquire(buffer, buf, BUFFER_LOCK_SHARE_EXCLUSIVE); > FlushBuffer(buf, reln, IOOBJECT_RELATION, IOCONTEXT_NORMAL); // <= =3D=3D HERE > BufferLockUnlock(buffer, buf); > } > ``` > > Unless I am missing something, if a function accepts these parameters, th= ey should generally be used. Thanks for the patch. Committed in 31b0544b32b - Melanie