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 1vgVTs-00ETE0-1o for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 22:06:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vgVTr-001c82-2A for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 22:06:16 +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 1vgVTr-001c7u-1B for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 22:06:15 +0000 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vgVTp-000hfS-1f for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 22:06:15 +0000 Received: by mail-qt1-x82a.google.com with SMTP id d75a77b69052e-4f822b2df7aso20103161cf.2 for ; Thu, 15 Jan 2026 14:06:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1768514772; cv=none; d=google.com; s=arc-20240605; b=io7ISRISGN+lf8EeI3F5B4mQXilizZXwORMrjiBAfnbrkoG3JzHZjDqxUUCffmQh8m z37sBMekINM0YXSdiQt89zgnZlUvgQidwI43qrY7CvHbDfkrR7kQhcE0o4rijKnonM1o 6V4smPPSgDwAf4X9f9GNxMqcr21DP54S6r9QNZF7v7IK9vPye2/icDVUtMSUcG47sW6I mhp00cbve/nsb8Np6o3g6EB0uhrvwhdNJXy6W1lkWh76IphLRK8NWyJIvDZ5yzD/WDk6 NkeroXA1cxr5iDfIyy1/WtriT2ca20aC4f1lwCqVA3M0q5JiVAVJRovXVRhZTdAeBXIZ saxA== 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=mAy+n86bUZwu+OKEk1BlQ2wk2ytS9+dI6PmRqhToyS8=; fh=ILQodTlMgoBkYpiDuaBJMFh7unU60k4NtRj764D95xM=; b=Y4f+1Al2uBnezFgvO22QaPyh4c9V3D5sDL5YFJSoCWg/ueQXn7ogV72q20D+XV5jDR YC3z0QSdVpZF5TuOKjgXviXcxqlXYPv3OA95Ab1GvBBq+TFux9wJktThdbHh5DwlseRq rptm9rvUYZoe7rNQKPe2ZZauHQ8Tlh0Cf4oFogocXGrJ8jfT5aqvtN9XGdgKmhAmrOW9 vwWkFL5OP/WjqahF2CxPap1a698EJ90TeXPrEG5d5HdmC4hn0GkKiBuniPD45MBVZIbd rOv1az7DjZXeitueOXXnuiWNQqFj+5hUAMx0gIoJPDZLY/9G+gsVM+S13UATwNMheuEV Pndg==; darn=lists.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=20230601; t=1768514772; x=1769119572; darn=lists.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=mAy+n86bUZwu+OKEk1BlQ2wk2ytS9+dI6PmRqhToyS8=; b=UWS5yVF82IHZXicdbLMHSCVXkQyq4lYWbCMMWZT9pPuQHeBGWVA2y8OYYpb+pUL8t4 aNZQBqKe3SXlxyjySAT68UhUeXE11eTXnvjmoyz64WJ+UCKkLvVI2esu+ALK6EbjwYHC 5vAXwRjXi2hOfozeoPZsCIsBFV8ZzZpkLmeu9YWwVtN/IaBJDA5BruhgA2so04x0Z/Aa 61MtCRGdJfuW5rkjSMlsmAoq3MivlemfujRgtcm8qLlRCcvTW4D0JIzAPlsaOECnnMrC fs4UaKWbjM/mif9mpGHQqfDNx0plpj5GA5E9jwru/BnURi65ptIzTWPq1H+rQI5Q5tw4 IETQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768514772; x=1769119572; 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=mAy+n86bUZwu+OKEk1BlQ2wk2ytS9+dI6PmRqhToyS8=; b=BwBwIhsWa2l0Isdhfm9HTK5YdBkrwl9kSC7urZEOCcTlmz72nGeGUcC7JGIPHz16MO CdRNJp96gl1fSoDWyFd22WZA3br0sVKKPhX7eyLPaylqHr9e6dm1ThDCgvg0bEHeog96 HPNAZuHSqcKm/feC/TIZ3NjHZ0Co/6qrtxeLNqyhoMpNL/mxw+mCTxKTUF39AtY6QSRO lCxyEbswlZhO9zf/3bQX1ntHKp/zPvU7Z4R14e8Vme3BwprfN/U0RFIY2099eBWsGskS wwyCBJccwFwyWbB6bYTV4heUZ8Q8L320LGGVF82YHf/Dgnsv+2Mioxd7SJFYY1HZ/NDV fzfA== X-Forwarded-Encrypted: i=1; AJvYcCVhcZBd/2sr9lxE7kSIaXP3wgt/B0/HG2eF8fzJbCF7OHYxnyQZkgvsAKf0nEEg2i2ArgDjM3SIpAWvHldj@lists.postgresql.org X-Gm-Message-State: AOJu0YzDZB92v8mZfKxtOxXc7JCZHPWR4f1cBphlspGwNViH8hTHTtnJ mK3a1aqdjG5kiKltd7TMTBVSoSjrpFN1LaucXsF6xKuqKMgiGeIQYJG1iOGd5VggLkGfWAuQTIw b39tLb9+RcxowARyBrSqiPCfc1a0U3oM= X-Gm-Gg: AY/fxX7vFjRdHlZbXQCtCAJuwilDao25mag4fWwYdwDAoTCmFQQ26PvLQQlfGsktPv1 WqbdCjR6qHfVvVqyg5UeWQ92be7sgACUpEMrxGRhw2tPy8eO6Brdj5tVdW5COTFWQgMYlVwDb5E AIpjVlgWe0XG16iBIzV0EAddo4QQge2/FqjEdbeWMWju8dHeJB1izPHSnc0PvgWb48lpxi6uFSX QwNXb/y+OdP+VKIF28ZEIHS4jw50P2lwnmewyeLtsaip4vXZUJEY2gJWhmRM0QQfRaKn7A= X-Received: by 2002:a05:622a:11c8:b0:4ed:aa7b:e1a6 with SMTP id d75a77b69052e-502a1fd1fd5mr11659591cf.81.1768514771679; Thu, 15 Jan 2026 14:06:11 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Fri, 16 Jan 2026 09:05:44 +1100 X-Gm-Features: AZwV_QhFaaF6FMGxWOw8UaRFK2olkvCYP7LHg7mP0FX2xaBAbGtJ3MqNv4w0wtk Message-ID: Subject: Re: Stack-based tracking of per-node WAL/buffer usage To: Andres Freund Cc: Lukas Fittl , PostgreSQL Hackers 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 Sat, Jan 10, 2026 at 6:38=E2=80=AFAM Andres Freund = wrote: > > Hi, > > > On 2025-10-31 00:18:04 -0700, Lukas Fittl wrote: > > Attached v4 patchset that addresses feedback (unless otherwise noted be= low) > > and is rebased on master. Other changes: > > > > [...] > > - Per our off-list conversation at PGConf.EU, added a patch (v4/0007) t= hat > > illustrates how the stack mechanism can be used to separate index and t= able > > buffer accesses in the EXPLAIN for Index Scans > > Nice! > > > I pushed 0001. The only changes I made were to break a few long lines. > > I happened to be reading the code in this recent push [1] and saw this new macro: +#define INSTR_TIME_LT(x,y) \ + ((x).ticks > (y).ticks) Is that macro name OK? It seemed backwards to me. Shouldn't it be called INSTR_TIME_GT because it is checking that x is "Greater Than" y? =3D=3D=3D=3D=3D=3D [1] https://github.com/postgres/postgres/commit/e5a5e0a90750d665cab417322b9= f85c806430d85#diff-d927962e2574e803c27ea9a429eeecf7bc29c7a38c830ccb3a10e9e3= da5ba357R187 Kind Regards. Peter Smith. Fujitsu Australia